@htilabs/platform-common-models 0.8.15 → 0.8.17

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 (45) hide show
  1. package/dist/constants/index.cjs +3 -1
  2. package/dist/constants/index.cjs.map +1 -1
  3. package/dist/constants/index.d.cts +1 -1
  4. package/dist/constants/index.d.ts +1 -1
  5. package/dist/constants/index.js +3 -1
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/{cvcEntry-0BIB9sen.d.cts → cvcEntry-DaDrEuTa.d.cts} +44 -44
  8. package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-DaDrEuTa.d.ts} +44 -44
  9. package/dist/cvcs/index.cjs +1387 -17
  10. package/dist/cvcs/index.cjs.map +1 -1
  11. package/dist/cvcs/index.d.cts +3636 -2184
  12. package/dist/cvcs/index.d.ts +3636 -2184
  13. package/dist/cvcs/index.js +1550 -182
  14. package/dist/cvcs/index.js.map +1 -1
  15. package/dist/{index-CDoqrfc1.d.ts → index-C0J3f169.d.ts} +1 -1
  16. package/dist/{index-Zu_mOJRn.d.cts → index-EPjPjR0z.d.cts} +1 -1
  17. package/dist/index.cjs +1471 -20
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +91 -8
  20. package/dist/index.d.ts +91 -8
  21. package/dist/index.js +1468 -20
  22. package/dist/index.js.map +1 -1
  23. package/dist/models/index.d.cts +2 -2
  24. package/dist/models/index.d.ts +2 -2
  25. package/dist/{platform-auth-AsfnIXfK.d.cts → platform-auth-CvQkzOy1.d.cts} +1 -1
  26. package/dist/{platform-auth-AsfnIXfK.d.ts → platform-auth-CvQkzOy1.d.ts} +1 -1
  27. package/dist/schemas/index.cjs.map +1 -1
  28. package/dist/schemas/index.d.cts +35 -35
  29. package/dist/schemas/index.d.ts +35 -35
  30. package/dist/schemas/index.js.map +1 -1
  31. package/dist/types/index.d.cts +2 -2
  32. package/dist/types/index.d.ts +2 -2
  33. package/package.json +1 -1
  34. package/src/__sot__/coreIndicators.pin.json +2 -1
  35. package/src/__tests__/__snapshots__/cvc-sot.snap +4 -4
  36. package/src/__tests__/core-information-scope-invariant.test.ts +134 -0
  37. package/src/__tests__/cvc-136-scoring-invariant.test.ts +7 -5
  38. package/src/__tests__/cvc-drift-gate.test.ts +26 -5
  39. package/src/__tests__/cvc-sot-snapshot.test.ts +11 -4
  40. package/src/constants/ic.ts +74 -4
  41. package/src/cvcs/coreIndicators.v1.0.0.json +18 -5
  42. package/src/cvcs/coreInformationScope.v1.0.0.json +1165 -0
  43. package/src/cvcs/index.ts +10 -0
  44. package/src/cvcs/sharePurpose.v1.0.0.json +80 -12
  45. package/src/generated/cvc-enums.ts +88 -3
package/src/cvcs/index.ts CHANGED
@@ -158,6 +158,7 @@ import romanticRelationshipChangeTypeSot from "./romanticRelationshipChangeType.
158
158
  import riskCategorySot from "./riskCategory.v1.0.0.json" with { type: "json" };
159
159
  import coreFunctionsSot from "./coreFunctions.v1.0.0.json" with { type: "json" };
160
160
  import needsAssessmentChangeTypeSot from "./needsAssessmentChangeType.v1.0.0.json" with { type: "json" };
161
+ import coreInformationScopeSot from "./coreInformationScope.v1.0.0.json" with { type: "json" };
161
162
  import roiScopeSot from "./roiScope.v1.0.0.json" with { type: "json" };
162
163
  import roiStatusSot from "./roiStatus.v1.0.0.json" with { type: "json" };
163
164
  import coreReferralOutcomeSot from "./coreReferralOutcome.v1.0.0.json" with { type: "json" };
@@ -202,6 +203,13 @@ import minorAdultStatusSot from "./minorAdultStatus.v1.0.0.json" with { type: "j
202
203
  // across the merged tree. Coexists with the `CVC_67_HMIS_SEX` constants in
203
204
  // `../constants/ic.ts`; the JSON is the SOT, the constants are the legacy view.
204
205
  import hmisSexSot from "./hmisSex.v1.0.0.json" with { type: "json" };
206
+ // Domain authored in PR #142 (0.8.15) alongside the codegen manifest entry in
207
+ // scripts/codegen-cvc-enums.ts, but never wired into this barrel — the SOT
208
+ // JSON shipped and `src/generated/cvc-enums.ts` regenerated correctly (it
209
+ // reads `src/cvcs/*.json` directly), but this file does not, so the export
210
+ // never reached the compiled `dist/cvcs/`. Wired in here so downstream
211
+ // consumers that derive their key maps from `./cvcs` (e.g. PAVE) can see it.
212
+ import criminalOrgCategorySot from "./criminalOrgCategory.v1.0.0.json" with { type: "json" };
205
213
 
206
214
  export {
207
215
  serviceCategoriesSot,
@@ -343,6 +351,7 @@ export {
343
351
  riskCategorySot,
344
352
  coreFunctionsSot,
345
353
  needsAssessmentChangeTypeSot,
354
+ coreInformationScopeSot,
346
355
  roiScopeSot,
347
356
  roiStatusSot,
348
357
  coreReferralOutcomeSot,
@@ -378,4 +387,5 @@ export {
378
387
  subjectTypeSot,
379
388
  minorAdultStatusSot,
380
389
  hmisSexSot,
390
+ criminalOrgCategorySot,
381
391
  };
@@ -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
  }
@@ -874,7 +874,7 @@ export type PreferredContactMethodKey = keyof typeof PreferredContactMethodKeys;
874
874
  /**
875
875
  * Key → positional code map for the `share_purpose` CVC domain.
876
876
  *
877
- * Domain: `share_purpose` · Version: 1.0.0 · Entries: 8
877
+ * Domain: `share_purpose` · Version: 1.1.0 · Entries: 12
878
878
  */
879
879
  export const SharePurposeKeys = {
880
880
  referral: "084-001-000-000-000-000-000",
@@ -885,6 +885,10 @@ export const SharePurposeKeys = {
885
885
  automatic_account_share: "084-006-000-000-000-000-000",
886
886
  discretionary_share: "084-007-000-000-000-000-000",
887
887
  records_request: "084-008-000-000-000-000-000",
888
+ investigation_support: "084-009-000-000-000-000-000",
889
+ threat_prevention: "084-010-000-000-000-000-000",
890
+ awareness_product: "084-011-000-000-000-000-000",
891
+ prosecution_support: "084-012-000-000-000-000-000",
888
892
  } as const;
889
893
 
890
894
  export type SharePurposeKey = keyof typeof SharePurposeKeys;
@@ -4050,6 +4054,86 @@ export const NeedsAssessmentChangeTypeKeys = {
4050
4054
 
4051
4055
  export type NeedsAssessmentChangeTypeKey = keyof typeof NeedsAssessmentChangeTypeKeys;
4052
4056
 
4057
+ /**
4058
+ * Key → positional code map for the `core_information_scope` CVC domain (DRAFT-TEMPORARY; canonical CVC-236, 12 policy-grain CATEGORIES + 54 authorization-grain UNITS. Categories are level 1 and NOT selectable; units are level 2 and are what an ROI or a share authorizes. Distinct from the sibling `roi_scope` domain, which is the FLAT item vocabulary and deliberately omits the category axis — roi_scope's 27 substantive keys are a strict SUBSET of these 54 units, with no renames, so adoption is additive and no stored ROI changes meaning).
4059
+ *
4060
+ * Domain: `core_information_scope` · Version: 1.0.0 · Entries: 70
4061
+ */
4062
+ export const CoreInformationScopeKeys = {
4063
+ missingness_root: "236-000-000-000-000-000-000",
4064
+ unknown: "236-000-000-000-000-000-001",
4065
+ anonymous: "236-000-000-000-000-000-002",
4066
+ data_not_collected: "236-000-000-000-000-000-003",
4067
+ identifying: "236-001-000-000-000-000-000",
4068
+ names: "236-001-001-000-000-000-000",
4069
+ dob: "236-001-002-000-000-000-000",
4070
+ addresses: "236-001-003-000-000-000-000",
4071
+ additional_ids: "236-001-004-000-000-000-000",
4072
+ demographics: "236-001-005-000-000-000-000",
4073
+ risk: "236-002-000-000-000-000-000",
4074
+ screen_indicators: "236-002-001-000-000-000-000",
4075
+ victimization: "236-002-002-000-000-000-000",
4076
+ ida_full: "236-002-003-000-000-000-000",
4077
+ ida_consid: "236-002-004-000-000-000-000",
4078
+ initial_screen: "236-002-005-000-000-000-000",
4079
+ tra: "236-002-006-000-000-000-000",
4080
+ lap: "236-002-007-000-000-000-000",
4081
+ danger_assessment: "236-002-008-000-000-000-000",
4082
+ injury_and_strangulation: "236-002-009-000-000-000-000",
4083
+ stalking_assessment: "236-002-010-000-000-000-000",
4084
+ ae_intake: "236-002-011-000-000-000-000",
4085
+ hope_scale: "236-002-012-000-000-000-000",
4086
+ assessment_records: "236-002-013-000-000-000-000",
4087
+ determinations: "236-002-014-000-000-000-000",
4088
+ offender_facilitator: "236-002-015-000-000-000-000",
4089
+ system_involvement: "236-002-016-000-000-000-000",
4090
+ derived_risk_signals: "236-002-017-000-000-000-000",
4091
+ contact: "236-003-000-000-000-000-000",
4092
+ contact_info: "236-003-001-000-000-000-000",
4093
+ safe_locations: "236-003-002-000-000-000-000",
4094
+ services: "236-004-000-000-000-000-000",
4095
+ contact_history: "236-004-001-000-000-000-000",
4096
+ service_history: "236-004-002-000-000-000-000",
4097
+ plans_goals: "236-004-003-000-000-000-000",
4098
+ notes: "236-005-000-000-000-000-000",
4099
+ screen_notes: "236-005-001-000-000-000-000",
4100
+ case_notes: "236-005-002-000-000-000-000",
4101
+ background: "236-005-003-000-000-000-000",
4102
+ health_accommodation: "236-006-000-000-000-000-000",
4103
+ accommodation_needs: "236-006-001-000-000-000-000",
4104
+ disability_subtypes: "236-006-002-000-000-000-000",
4105
+ mental_health_status: "236-006-003-000-000-000-000",
4106
+ substance_use_status: "236-006-004-000-000-000-000",
4107
+ chronic_health_status: "236-006-005-000-000-000-000",
4108
+ hiv_status: "236-006-006-000-000-000-000",
4109
+ mental_health_screen: "236-006-007-000-000-000-000",
4110
+ trauma_and_coping_screen: "236-006-008-000-000-000-000",
4111
+ behavioral_health_intake: "236-006-009-000-000-000-000",
4112
+ immigration_legal_status: "236-007-000-000-000-000-000",
4113
+ immigration_status: "236-007-001-000-000-000-000",
4114
+ uscis_alien_number: "236-007-002-000-000-000-000",
4115
+ federal_protection_applications: "236-007-003-000-000-000-000",
4116
+ tvap_enrollment: "236-007-004-000-000-000-000",
4117
+ le_report_status: "236-007-005-000-000-000-000",
4118
+ system: "236-008-000-000-000-000-000",
4119
+ system_info: "236-008-001-000-000-000-000",
4120
+ network_associations: "236-009-000-000-000-000-000",
4121
+ network_membership: "236-009-001-000-000-000-000",
4122
+ persona_links: "236-009-002-000-000-000-000",
4123
+ commercial_activity: "236-010-000-000-000-000-000",
4124
+ ad_content: "236-010-001-000-000-000-000",
4125
+ commercial_patterns: "236-010-002-000-000-000-000",
4126
+ investigative_work_product: "236-011-000-000-000-000-000",
4127
+ case_determinations: "236-011-001-000-000-000-000",
4128
+ case_lifecycle: "236-011-002-000-000-000-000",
4129
+ case_attachments: "236-011-003-000-000-000-000",
4130
+ object_identifiers: "236-012-000-000-000-000-000",
4131
+ phone_identifiers: "236-012-001-000-000-000-000",
4132
+ object_identity_attributes: "236-012-002-000-000-000-000",
4133
+ } as const;
4134
+
4135
+ export type CoreInformationScopeKey = keyof typeof CoreInformationScopeKeys;
4136
+
4053
4137
  /**
4054
4138
  * Key → positional code map for the `roi_scope` CVC domain (DRAFT-TEMPORARY; the 15 ROI scope ITEMS an ROI authorizes for sharing, sourced from PAVE `@pave/domain` ROI_SCOPE_KEYS. The item axis only — named bundles over these items are ROI_SCOPE_PRESET_NAMES. The prototype's 27-item HTI_SHARE_SCOPE_GROUPS superset holds +12 health-accommodation / immigration-legal items that are the documented extension set).
4055
4139
  *
@@ -4146,9 +4230,9 @@ export const DhStateKeys = {
4146
4230
  export type DhStateKey = keyof typeof DhStateKeys;
4147
4231
 
4148
4232
  /**
4149
- * Key → positional code map for the `core_indicators` CVC domain (CVC-136; 215 canonical indicator codes re-sourced from prototype `data/core_indicators.yaml` @ 84a1b677 plus the 2 codes @hti/scoring emits ahead of the codebook). Entries carry `family` / `polarity` / `severity` / `isAlert` / `alertWhen`; the alert list is a DERIVED VIEW over `isAlert`, not a rival taxonomy.
4233
+ * Key → positional code map for the `core_indicators` CVC domain (CVC-136; 214 canonical indicator codes re-sourced from prototype `data/core_indicators.yaml` @ 622410b + 2 scoring-ahead codes @hti/scoring emits before the codebook adopted them = 216 substantive). Entries carry `family` / `polarity` / `severity` / `isAlert` / `alertWhen`; the alert list is a DERIVED VIEW over `isAlert`, not a rival taxonomy.
4150
4234
  *
4151
- * Domain: `core_indicators` · Version: 1.0.0 · Entries: 219
4235
+ * Domain: `core_indicators` · Version: 1.0.0 · Entries: 220
4152
4236
  */
4153
4237
  export const CoreIndicatorKeys = {
4154
4238
  missingness_root: "136-000-000-000-000-000-000",
@@ -4370,6 +4454,7 @@ export const CoreIndicatorKeys = {
4370
4454
  sexualized_content_in_person_performance_activity: "136-213-000-000-000-000-000",
4371
4455
  sexualized_content_online_performance_activity: "136-214-000-000-000-000-000",
4372
4456
  trauma_perpetrator_is_current_manager: "136-215-000-000-000-000-000",
4457
+ active_protective_order: "136-216-000-000-000-000-000",
4373
4458
  } as const;
4374
4459
 
4375
4460
  export type CoreIndicatorKey = keyof typeof CoreIndicatorKeys;