@htilabs/platform-common-models 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/constants/index.cjs +33 -0
  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 +29 -0
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/cvcs/index.cjs +96 -13
  8. package/dist/cvcs/index.cjs.map +1 -1
  9. package/dist/cvcs/index.d.cts +101 -12
  10. package/dist/cvcs/index.d.ts +101 -12
  11. package/dist/cvcs/index.js +96 -13
  12. package/dist/cvcs/index.js.map +1 -1
  13. package/dist/enums/index.cjs +7 -1
  14. package/dist/enums/index.cjs.map +1 -1
  15. package/dist/enums/index.d.cts +8 -2
  16. package/dist/enums/index.d.ts +8 -2
  17. package/dist/enums/index.js +7 -1
  18. package/dist/enums/index.js.map +1 -1
  19. package/dist/index.cjs +136 -14
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +132 -14
  24. package/dist/index.js.map +1 -1
  25. package/dist/{platform-auth-64U8jjuw.d.cts → platform-auth-CrF5U_JH.d.cts} +43 -2
  26. package/dist/{platform-auth-64U8jjuw.d.ts → platform-auth-CrF5U_JH.d.ts} +43 -2
  27. package/dist/schemas/index.cjs +234 -0
  28. package/dist/schemas/index.cjs.map +1 -1
  29. package/dist/schemas/index.js +234 -0
  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__/coreIndicatorFields.ts +4 -4
  35. package/src/__sot__/coreIndicators.pin.json +62 -2
  36. package/src/__sot__/scoringEmits.pin.json +9 -4
  37. package/src/__tests__/__snapshots__/cvc-sot.snap +2 -2
  38. package/src/__tests__/cvc-136-scoring-invariant.test.ts +89 -28
  39. package/src/__tests__/cvc-drift-gate.test.ts +149 -27
  40. package/src/__tests__/cvc-sot-snapshot.test.ts +3 -1
  41. package/src/__tests__/cvc-structural.test.ts +1 -1
  42. package/src/constants/ic.ts +163 -3
  43. package/src/cvcs/{coreIndicators.v1.0.0.json → coreIndicators.v1.1.0.json} +93 -10
  44. package/src/cvcs/index.ts +1 -1
  45. package/src/generated/cvc-enums.ts +8 -2
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "domain": "core_indicators",
3
3
  "name": "Core Indicators (CVC-136)",
4
- "version": "1.0.0",
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)",
4
+ "version": "1.1.0",
5
+ "_status": "CANONICAL — re-sourced from the live canonical catalog `data/core_indicators.yaml` @ prototype HEAD c53378f (220 codes; +6 vs the 0.8.17 pin 622410b, 0 withdrawn upstream, plus the projected-field revision on 136-061 `exploitative_pricing_tier_low` the same delta carried), reconciled against @hti/scoring (`weights/risk.weights.json` @ 9c209cf, `emits_by_code`, 174 codes). VERSION 1.0.0 -> 1.1.0 (2026-10-06): this refresh removes `selectable` from two rows and redefines a third, so it is NOT additive and cannot reuse the published 1.0.0 content hash — the seeder's §9.1.2 ContentDriftError guard (scripts/seed-cvc.ts) would refuse to re-seed 1.0.0 with different content (the #188/#190 precedent; `incidentParticipationRoles` 1.1.0 is the shape). The 2 former scoring-ahead codes (`coercive_debt_pressure_youth` 136-033, `debt_terms_deceptive_youth` 136-050, formerly `pendingUpstreamAdoption: true`) are DEPRECATED, NOT REMOVED: `selectable: false`, `deprecated: true`, `supersededBy` their canonical rows `coercive_debt_pressure` (136-032) / `debt_terms_deceptive` (136-049), which upstream carries as `legacy_aliases`. hti-scoring 9c209cf no longer emits them, but PAVE 2.0 `develop` @ 07f3ccd still WRITES both from the IDA (`IDA-syn-missing_care-4i`/`4ii`, packages/api-core/src/rules/assessments/ida/emits.ts) and scores them from its 2026-07-17 vendored weights, so a stored assertion under either key must keep resolving in this SOT. Thread `develop` @ 28580ab has no writer. Their positional codes are HELD by the deprecated rows and are never reissued to another key. 220 selectable + 2 deprecated + the missingness quadruplet = 226 entries. New codes are APPENDED at 217–222 so every previously issued positional code stays stable.",
6
+ "_source": "htilabstech/prototype@c53378f data/core_indicators.yaml + htilabstech/hti-scoring@9c209cf weights/risk.weights.json (emits_by_code)",
7
7
  "levels": {
8
8
  "0": "Unknown or Missing",
9
9
  "1": "Indicator"
@@ -480,11 +480,12 @@
480
480
  "code": "136-033-000-000-000-000-000",
481
481
  "key": "coercive_debt_pressure_youth",
482
482
  "title": "Pressured to do things to pay off debt (youth missing-from-care)",
483
- "selectable": true,
483
+ "selectable": false,
484
484
  "parentCode": null,
485
485
  "childCodes": [],
486
- "definition": "Indication that a youth who is missing from care was pressured or coerced into doing things in order to pay off a debt. Youth-specific sibling of `coercive_debt_pressure`. PENDING UPSTREAM ADOPTION: this code is NOT yet present in the canonical `data/core_indicators.yaml` at prototype HEAD a596eb9. It is retained because @hti/scoring (the declared scoring SOT, weights/risk.weights.json @ 9b5d654) EMITS it via `emits_by_code` — scoring is ahead of the codebook here. Withdrawing it would break the scoring contract. File upstream for adoption into core_indicators.yaml.",
487
- "pendingUpstreamAdoption": true
486
+ "definition": "DEPRECATED 2026-10-06 — superseded by `coercive_debt_pressure` (136-032); the canonical catalog carries this key as a `legacy_alias` of that row and @hti/scoring 9c209cf no longer emits it. Retained read-only because PAVE 2.0 `develop` (IDA `IDA-syn-missing_care-4i`, emits.ts) still writes it and assertions stored under this key must keep resolving. Original meaning: indication that a youth who is missing from care was pressured or coerced into doing things in order to pay off a debt. Youth-specific sibling of `coercive_debt_pressure`. Do not offer for new writes; bind the canonical key.",
487
+ "deprecated": true,
488
+ "supersededBy": "coercive_debt_pressure"
488
489
  },
489
490
  {
490
491
  "code": "136-034-000-000-000-000-000",
@@ -702,11 +703,12 @@
702
703
  "code": "136-050-000-000-000-000-000",
703
704
  "key": "debt_terms_deceptive_youth",
704
705
  "title": "Debt repayment terms differed from what was expected (youth missing-from-care)",
705
- "selectable": true,
706
+ "selectable": false,
706
707
  "parentCode": null,
707
708
  "childCodes": [],
708
- "definition": "Indication that, for a youth missing from care, the terms of a debt or its repayment differed from what was represented or expected. Youth-specific sibling of `debt_terms_deceptive`. PENDING UPSTREAM ADOPTION: this code is NOT yet present in the canonical `data/core_indicators.yaml` at prototype HEAD a596eb9. It is retained because @hti/scoring (the declared scoring SOT, weights/risk.weights.json @ 9b5d654) EMITS it via `emits_by_code` — scoring is ahead of the codebook here. Withdrawing it would break the scoring contract. File upstream for adoption into core_indicators.yaml.",
709
- "pendingUpstreamAdoption": true
709
+ "definition": "DEPRECATED 2026-10-06 — superseded by `debt_terms_deceptive` (136-049); the canonical catalog carries this key as a `legacy_alias` of that row and @hti/scoring 9c209cf no longer emits it. Retained read-only because PAVE 2.0 `develop` (IDA `IDA-syn-missing_care-4ii`, emits.ts) still writes it and assertions stored under this key must keep resolving. Original meaning: indication that, for a youth missing from care, the terms of a debt or its repayment differed from what was represented or expected. Youth-specific sibling of `debt_terms_deceptive`. Do not offer for new writes; bind the canonical key.",
710
+ "deprecated": true,
711
+ "supersededBy": "debt_terms_deceptive"
710
712
  },
711
713
  {
712
714
  "code": "136-051-000-000-000-000-000",
@@ -849,7 +851,7 @@
849
851
  "selectable": true,
850
852
  "parentCode": null,
851
853
  "childCodes": [],
852
- "definition": "Ad-derived pricing tier indicates unusually low hourly price relative to local median, potentially signaling economic duress and vulnerability.",
854
+ "definition": "Ad-derived pricing tier is LOW-dominant — the person's parsed hourly rates fall under $50/hr against the pooled ad population (CVC-277 core-CS_price_tier_band; Sarah 2026-07-22 pooled baseline, about the bottom quartile) — potentially signaling economic duress and vulnerability. The SRS design framed this as \"relative to the local median\"; a per-market baseline is the refinement on record, not built.",
853
855
  "family": "unfamilied",
854
856
  "polarity": "depends",
855
857
  "severity": "informational",
@@ -2913,6 +2915,87 @@
2913
2915
  "polarity": "depends",
2914
2916
  "severity": "caution",
2915
2917
  "isAlert": "none"
2918
+ },
2919
+ {
2920
+ "code": "136-217-000-000-000-000-000",
2921
+ "key": "disclosed_fear_at_intake",
2922
+ "title": "Disclosed fear of a specific person",
2923
+ "selectable": true,
2924
+ "parentCode": null,
2925
+ "childCodes": [],
2926
+ "definition": "The person has told a worker they are afraid of a named or identifiable individual — commonly a former or current partner. Distinct from concerning_mannerisms_anxious_fearful_depressed, which is affect a worker observes rather than something the person said, and from threats_of_harm, which requires a threat to have been made; fear can be current and well-founded with no fresh threat.",
2927
+ "family": "lethality_dv",
2928
+ "polarity": "increases_risk",
2929
+ "severity": "elevated",
2930
+ "isAlert": "thread_pave",
2931
+ "alertWhen": "current_only"
2932
+ },
2933
+ {
2934
+ "code": "136-218-000-000-000-000-000",
2935
+ "key": "does_not_control_housing",
2936
+ "title": "Limited independence: does not control where they live",
2937
+ "selectable": true,
2938
+ "parentCode": null,
2939
+ "childCodes": [],
2940
+ "definition": "Indication that an employer, partner, or other person decides where the person lives — housing is assigned or controlled by someone else, rather than chosen by the person.",
2941
+ "family": "mechanism_control",
2942
+ "polarity": "increases_risk",
2943
+ "severity": "elevated",
2944
+ "isAlert": "none"
2945
+ },
2946
+ {
2947
+ "code": "136-219-000-000-000-000-000",
2948
+ "key": "oppressive_home_life",
2949
+ "title": "Oppressive, unsafe, or unstable home life",
2950
+ "selectable": true,
2951
+ "parentCode": null,
2952
+ "childCodes": [],
2953
+ "definition": "Indication that the person's current home life is oppressive, unsafe, or unstable — a present-condition vulnerability, distinct from the childhood household challenges history (VIII-B).",
2954
+ "family": "vulnerability_context",
2955
+ "polarity": "increases_risk",
2956
+ "severity": "elevated",
2957
+ "isAlert": "none"
2958
+ },
2959
+ {
2960
+ "code": "136-220-000-000-000-000-000",
2961
+ "key": "recent_separation",
2962
+ "title": "Recent separation from abusive partner",
2963
+ "selectable": true,
2964
+ "parentCode": null,
2965
+ "childCodes": [],
2966
+ "definition": "Indication that the person has recently left or separated from an abusive partner. Campbell's Danger Assessment treats the period following separation as the highest-risk window for intimate-partner homicide — the signal is about having got out, not about current cohabitation.",
2967
+ "family": "lethality_dv",
2968
+ "polarity": "depends",
2969
+ "severity": "elevated",
2970
+ "isAlert": "thread_pave",
2971
+ "alertWhen": "recency_under_year"
2972
+ },
2973
+ {
2974
+ "code": "136-221-000-000-000-000-000",
2975
+ "key": "survival_sex",
2976
+ "title": "Survival sex (sex exchanged to meet basic needs)",
2977
+ "selectable": true,
2978
+ "parentCode": null,
2979
+ "childCodes": [],
2980
+ "definition": "Indication that the person exchanges sex acts to meet basic survival needs — housing, food, drugs, protection, or money for essentials — rather than as an income choice. A standalone activity signal that can coexist with, or exist entirely without, a trafficking determination; it asserts the circumstance of the exchange, never the determination.",
2981
+ "family": "cs_industry_context",
2982
+ "polarity": "depends",
2983
+ "severity": "elevated",
2984
+ "isAlert": "none"
2985
+ },
2986
+ {
2987
+ "code": "136-222-000-000-000-000-000",
2988
+ "key": "unable_to_speak_freely",
2989
+ "title": "Unable to speak freely",
2990
+ "selectable": true,
2991
+ "parentCode": null,
2992
+ "childCodes": [],
2993
+ "definition": "Indication that the person is not able to speak for themselves — a third party insists on being present, answers on their behalf, or interprets for them, or the person is never encountered alone. Distinct from inability_to_account_for_self, which is about the person's own account being scripted or confused; this is about another party controlling the conversation.",
2994
+ "family": "mechanism_control",
2995
+ "polarity": "depends",
2996
+ "severity": "elevated",
2997
+ "isAlert": "thread_pave",
2998
+ "alertWhen": "current_only"
2916
2999
  }
2917
3000
  ]
2918
3001
  }
package/src/cvcs/index.ts CHANGED
@@ -168,7 +168,7 @@ import coreInformationScopeSot from "./coreInformationScope.v1.0.0.json" with {
168
168
  import roiScopeSot from "./roiScope.v1.0.0.json" with { type: "json" };
169
169
  import roiStatusSot from "./roiStatus.v1.0.0.json" with { type: "json" };
170
170
  import coreReferralOutcomeSot from "./coreReferralOutcome.v1.0.0.json" with { type: "json" };
171
- import coreIndicatorsSot from "./coreIndicators.v1.0.0.json" with { type: "json" };
171
+ import coreIndicatorsSot from "./coreIndicators.v1.1.0.json" with { type: "json" };
172
172
  import coreDhStateSot from "./coreDhState.v1.0.0.json" with { type: "json" };
173
173
  import riskSeverityBandSot from "./riskSeverityBand.v1.0.0.json" with { type: "json" };
174
174
  import riskIdentificationMilestoneSot from "./riskIdentificationMilestone.v1.0.0.json" with { type: "json" };
@@ -4277,9 +4277,9 @@ export const DhStateKeys = {
4277
4277
  export type DhStateKey = keyof typeof DhStateKeys;
4278
4278
 
4279
4279
  /**
4280
- * 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.
4280
+ * Key → positional code map for the `core_indicators` CVC domain (CVC-136; 220 canonical indicator codes re-sourced from prototype `data/core_indicators.yaml` @ c53378f, reconciled against @hti/scoring `emits_by_code` @ 9c209cf; the 2 former scoring-ahead `_youth` codes are DEPRECATED read-only rows — `selectable: false`, `supersededBy` their canonical siblings — kept because PAVE 2.0 still writes them = 222 substantive; SOT v1.1.0). Entries carry `family` / `polarity` / `severity` / `isAlert` / `alertWhen`; the alert list is a DERIVED VIEW over `isAlert`, not a rival taxonomy.
4281
4281
  *
4282
- * Domain: `core_indicators` · Version: 1.0.0 · Entries: 220
4282
+ * Domain: `core_indicators` · Version: 1.1.0 · Entries: 226
4283
4283
  */
4284
4284
  export const CoreIndicatorKeys = {
4285
4285
  missingness_root: "136-000-000-000-000-000-000",
@@ -4502,6 +4502,12 @@ export const CoreIndicatorKeys = {
4502
4502
  sexualized_content_online_performance_activity: "136-214-000-000-000-000-000",
4503
4503
  trauma_perpetrator_is_current_manager: "136-215-000-000-000-000-000",
4504
4504
  active_protective_order: "136-216-000-000-000-000-000",
4505
+ disclosed_fear_at_intake: "136-217-000-000-000-000-000",
4506
+ does_not_control_housing: "136-218-000-000-000-000-000",
4507
+ oppressive_home_life: "136-219-000-000-000-000-000",
4508
+ recent_separation: "136-220-000-000-000-000-000",
4509
+ survival_sex: "136-221-000-000-000-000-000",
4510
+ unable_to_speak_freely: "136-222-000-000-000-000-000",
4505
4511
  } as const;
4506
4512
 
4507
4513
  export type CoreIndicatorKey = keyof typeof CoreIndicatorKeys;