@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
@@ -2,8 +2,8 @@
2
2
  "domain": "core_indicators",
3
3
  "name": "Core Indicators (CVC-136)",
4
4
  "version": "1.0.0",
5
- "_status": "CANONICAL — re-sourced 0.8.13 from the live canonical catalog `data/core_indicators.yaml` @ prototype HEAD a596eb9 (208 codes), plus 2 codes that @hti/scoring (`weights/risk.weights.json` @ 9b5d654, `emits_by_code`) emits but the codebook has not yet adopted (`coercive_debt_pressure_youth`, `debt_terms_deceptive_youth`) = 210 substantive codes. 0.8.12 shipped 199 hand-coded codes in `src/constants/ic.ts` (`CVC_136_CORE_INDICATOR_VALUES`); 54 of those were invented rollup prefixes (`vc_*`, `csi_*`, `csctx_*`, `dv_*`, `net_*`, `auto_*`) with zero occurrences upstream and zero consumers in @hti/scoring, and 1 (`unusual_work_circumstances_general`) was coined from a label's parenthetical; all 55 are WITHDRAWN. 66 canonical codes that were missing are ADDED. Math: 199 - 1 - 54 + 66 = 210. HARD INVARIANT (enforced by `src/__tests__/cvc-136-scoring-invariant.test.ts`): every one of the 169 codes in @hti/scoring's `emits_by_code` is present in this domain. Entry attributes `family` / `polarity` / `severity` / `isAlert` / `alertWhen` are carried verbatim from the canonical catalog. `isAlert` is the ALERT AXIS: the alert list is a DERIVED VIEW over this domain (isAlert in {thread_pave, platform, pave}), not a separate taxonomy.",
6
- "_source": "htilabstech/prototype@a596eb9 data/core_indicators.yaml + htilabstech/hti-scoring@9b5d654 weights/risk.weights.json (emits_by_code)",
5
+ "_status": "CANONICAL — re-sourced from the live canonical catalog `data/core_indicators.yaml` @ prototype HEAD 622410b (214 codes; +1 vs the 0.8.14 pin 84a1b67, 0 withdrawn, plus the projected-field revisions on 136-007 / 136-094 the same delta carried), plus 2 codes that @hti/scoring (`weights/risk.weights.json` @ 9b5d654, `emits_by_code`) emits but the codebook has not yet adopted (`coercive_debt_pressure_youth`, `debt_terms_deceptive_youth`), each flagged `pendingUpstreamAdoption: true`. 216 substantive + the missingness quadruplet = 220 entries. New codes are APPENDED at 216 so every previously issued positional code stays stable.",
6
+ "_source": "htilabstech/prototype@622410b data/core_indicators.yaml + htilabstech/hti-scoring@9b5d654 weights/risk.weights.json (emits_by_code)",
7
7
  "levels": {
8
8
  "0": "Unknown or Missing",
9
9
  "1": "Indicator"
@@ -135,7 +135,7 @@
135
135
  {
136
136
  "code": "136-007-000-000-000-000-000",
137
137
  "key": "acknowledgement_or_report_of_human_trafficking",
138
- "title": "Acknowledgement or report of human trafficking",
138
+ "title": "Human trafficking disclosure or report",
139
139
  "selectable": true,
140
140
  "parentCode": null,
141
141
  "childCodes": [],
@@ -1286,7 +1286,7 @@
1286
1286
  "selectable": true,
1287
1287
  "parentCode": null,
1288
1288
  "childCodes": [],
1289
- "definition": "Indication of involvement with juvenile justice and/or child welfare systems.",
1289
+ "definition": "Indication of involvement with juvenile justice and/or child welfare systems (system unspecified — deprecated combined code; see read-time alias policy above).",
1290
1290
  "family": "vulnerability_context",
1291
1291
  "polarity": "depends",
1292
1292
  "severity": "elevated",
@@ -1976,7 +1976,7 @@
1976
1976
  "selectable": true,
1977
1977
  "parentCode": null,
1978
1978
  "childCodes": [],
1979
- "definition": "Canonical activity evidence (DH § II Activity 2.2 family) that the person engages in sexualized content, performance, or communications activity — recorded descriptively on a location capture; derivation happens in the risk tree.",
1979
+ "definition": "Canonical activity evidence (DH § II Activity 2.2 family) that the person engages in sexualized content, performance, or communications activity — recorded descriptively on a location capture; derivation happens in the risk tree. UMBRELLA NOTE (SEXUALIZED-CONTENT-SPLIT-2026-07-15, Crysta directive executing the 2026-07-15 Q2 ruling's codified path) — new capture that CAN distinguish online vs in-person fires the split variants below instead; this umbrella stays valid for existing captures and for sources that cannot make the distinction, and remains DOCK-ONLY in the DH (no prompt route — an honest prompt answer is impossible without the split).",
1980
1980
  "family": "cs_industry_context",
1981
1981
  "polarity": "increases_risk",
1982
1982
  "severity": "elevated",
@@ -2835,6 +2835,84 @@
2835
2835
  "polarity": "increases_risk",
2836
2836
  "severity": "elevated",
2837
2837
  "isAlert": "none"
2838
+ },
2839
+ {
2840
+ "code": "136-211-000-000-000-000-000",
2841
+ "key": "clients_unaware_of_third_party_coordination",
2842
+ "title": "Clients unaware they are coordinating with a third party (concealed dispatch)",
2843
+ "selectable": true,
2844
+ "parentCode": null,
2845
+ "childCodes": [],
2846
+ "definition": "LEADS TRA-7-aware captured that sex buyers reaching out to \"the person\" are in fact coordinating with a third party (dispatcher / manager / call service) WITHOUT knowing it — a concealed-intermediary booking pattern. Concealment of the coordinating third party from buyers is a control + facilitation marker over and above third-party coordination itself (which TRA-7 sometimes/never + TRA-7-who already capture): the operation is actively passing as the provider. Authored 2026-07-17 (TRA-VETTING, Crysta: \"let's author one\") for the restored production follow-up question.",
2847
+ "family": "mechanism_control",
2848
+ "polarity": "increases_risk",
2849
+ "severity": "elevated",
2850
+ "isAlert": "none"
2851
+ },
2852
+ {
2853
+ "code": "136-212-000-000-000-000-000",
2854
+ "key": "depends_on_spouse_or_family_for_immigration_status",
2855
+ "title": "Depends on spouse / family member for immigration status (tied family visa)",
2856
+ "selectable": true,
2857
+ "parentCode": null,
2858
+ "childCodes": [],
2859
+ "definition": "Indication the person's legal ability to remain in the U.S. depends on a spouse, fiancé(e), or family member (family/fiancé-based immigrant visa or derivative status) while their current status is a valid or overstayed visa. The family twin of depends_on_employer_for_immigration_status: a visa tied to a potentially abusive relationship is a major dependence vulnerability and a coercion lever (\"stay / comply or lose your status\"). Authored 2026-07-17 (TRA-VETTING open-items round, Crysta: dependence \"whether it is via your husband or your employer is a MAJOR vulnerability\").",
2860
+ "family": "mechanism_control",
2861
+ "polarity": "depends",
2862
+ "severity": "elevated",
2863
+ "isAlert": "none"
2864
+ },
2865
+ {
2866
+ "code": "136-213-000-000-000-000-000",
2867
+ "key": "sexualized_content_in_person_performance_activity",
2868
+ "title": "In-person sexualized performance / appearance-based activity",
2869
+ "selectable": true,
2870
+ "parentCode": null,
2871
+ "childCodes": [],
2872
+ "definition": "Canonical activity evidence (DH § II Activity 2.2.3) that the person engages in in-person sexualized, erotic, appearance-based, or entertainment activity with sexualized expectations — stripping, dancing, posing, hostess or venue work, escort/companionship without an established sex act — sex-market-adjacent, recorded descriptively; not necessarily a sex act for value.",
2873
+ "family": "cs_industry_context",
2874
+ "polarity": "increases_risk",
2875
+ "severity": "elevated",
2876
+ "isAlert": "none"
2877
+ },
2878
+ {
2879
+ "code": "136-214-000-000-000-000-000",
2880
+ "key": "sexualized_content_online_performance_activity",
2881
+ "title": "Online sexual performance / interactive sexual content activity",
2882
+ "selectable": true,
2883
+ "parentCode": null,
2884
+ "childCodes": [],
2885
+ "definition": "Canonical activity evidence (DH § II Activity 2.2.2) that the person engages in sexualized or sexually explicit activity performed, streamed, recorded, messaged, or displayed through online or digital platforms — webcamming, livestreams, paid chats, content-platform work — recorded descriptively whether or not a commercial sex act is established.",
2886
+ "family": "cs_industry_context",
2887
+ "polarity": "increases_risk",
2888
+ "severity": "elevated",
2889
+ "isAlert": "none"
2890
+ },
2891
+ {
2892
+ "code": "136-215-000-000-000-000-000",
2893
+ "key": "trauma_perpetrator_is_current_manager",
2894
+ "title": "Trauma perpetrator is a current manager / facilitator (trauma-bonded control)",
2895
+ "selectable": true,
2896
+ "parentCode": null,
2897
+ "childCodes": [],
2898
+ "definition": "ENGINE-DERIVED conjunction: the same person the subject named as a trauma perpetrator (TRA-35 sexual violence / physical abuse / emotional-verbal-stalking capture) ALSO holds an operational-control edge over the subject (a TRA facilitation who-answer — posts ads / arranges dates / controls or keeps earnings / receives payments / organizes travel / holds documentation / above in the operation — or a relationship pair with a facilitator/offender role signal of their own). Two independently-captured facts joined on person identity — never an assumption (Crysta 2026-07-17: \"these are two different questions\"). The conjunction is the classic trauma-bonded, difficult-to-leave control situation.",
2899
+ "family": "mechanism_control",
2900
+ "polarity": "increases_risk",
2901
+ "severity": "severe",
2902
+ "isAlert": "none"
2903
+ },
2904
+ {
2905
+ "code": "136-216-000-000-000-000-000",
2906
+ "key": "active_protective_order",
2907
+ "title": "Active protective order (client-reported)",
2908
+ "selectable": true,
2909
+ "parentCode": null,
2910
+ "childCodes": [],
2911
+ "definition": "The client reported in intake screening that they currently hold a temporary or permanent protective order. A legal-status + safety-planning fact, NOT a trafficking-risk driver — catalogued descriptive, deliberately NOT tree-mapped (Crysta ruling 2026-08-08). The screening question captures no counterparty, so this code says only \"an order exists\", never who it restrains. The scoring reads of a protective order are counterparty-gated and record-keyed elsewhere and must stay there — the Severity acute driver protection_order_against_trafficker (relational; investigativeSeverity.ts) and the perpetrator leaf P-II-D (fires only on defendantPersonId === subject). Tree-mapping this code would score a survivor higher for having sought court protection, which is the Ship-B inversion (a victim's own order raising her P-II) relocated to the victim tree.",
2912
+ "family": "lethality_dv",
2913
+ "polarity": "depends",
2914
+ "severity": "caution",
2915
+ "isAlert": "none"
2838
2916
  }
2839
2917
  ]
2840
2918
  }