@htilabs/platform-common-models 0.8.17 → 0.8.19

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 (41) hide show
  1. package/dist/constants/index.cjs.map +1 -1
  2. package/dist/constants/index.js.map +1 -1
  3. package/dist/cvcs/index.cjs +4346 -21
  4. package/dist/cvcs/index.cjs.map +1 -1
  5. package/dist/cvcs/index.d.cts +6683 -2020
  6. package/dist/cvcs/index.d.ts +6683 -2020
  7. package/dist/cvcs/index.js +4344 -21
  8. package/dist/cvcs/index.js.map +1 -1
  9. package/dist/{index-C0J3f169.d.ts → index-4DiJrn7y.d.ts} +1 -1
  10. package/dist/{index-EPjPjR0z.d.cts → index-qreOzXYS.d.cts} +1 -1
  11. package/dist/index.cjs +4681 -32
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +350 -18
  14. package/dist/index.d.ts +350 -18
  15. package/dist/index.js +4677 -32
  16. package/dist/index.js.map +1 -1
  17. package/dist/models/index.d.cts +2 -2
  18. package/dist/models/index.d.ts +2 -2
  19. package/dist/schemas/index.cjs.map +1 -1
  20. package/dist/schemas/index.d.cts +25 -25
  21. package/dist/schemas/index.d.ts +25 -25
  22. package/dist/schemas/index.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/__sot__/README.md +36 -1
  25. package/src/__sot__/coreIndicatorFields.ts +331 -0
  26. package/src/__sot__/coreIndicators.pin.json +1929 -1
  27. package/src/__sot__/cvcIndex.pin.json +8 -4
  28. package/src/__tests__/__snapshots__/cvc-sot.snap +11 -3
  29. package/src/__tests__/cvc-181-182-country-parity.test.ts +163 -0
  30. package/src/__tests__/cvc-drift-gate.test.ts +407 -12
  31. package/src/__tests__/cvc-sot-snapshot.test.ts +31 -3
  32. package/src/__tests__/cvc-structural.test.ts +8 -0
  33. package/src/constants/ic.ts +14 -0
  34. package/src/cvcs/countries.v1.0.0.json +3077 -0
  35. package/src/cvcs/determinationHelperCategories.v1.0.0.json +1166 -0
  36. package/src/cvcs/index.ts +4 -0
  37. package/src/cvcs/personRelationships.v1.0.0.json +67 -2
  38. package/src/cvcs/relationshipConcern.v1.0.0.json +28 -19
  39. package/src/generated/cvc-enums.ts +350 -14
  40. package/dist/{cvcEntry-DaDrEuTa.d.cts → cvcEntry-ctHTp2df.d.cts} +8 -8
  41. package/dist/{cvcEntry-DaDrEuTa.d.ts → cvcEntry-ctHTp2df.d.ts} +8 -8
package/src/cvcs/index.ts CHANGED
@@ -180,6 +180,8 @@ import sessionTemplateSot from "./sessionTemplate.v1.0.0.json" with { type: "jso
180
180
  import serviceDeliveryChannelSot from "./serviceDeliveryChannel.v1.0.0.json" with { type: "json" };
181
181
  import whyNotsSot from "./whyNots.v1.0.0.json" with { type: "json" };
182
182
  import citizenshipSot from "./citizenship.v1.0.0.json" with { type: "json" };
183
+ import countriesSot from "./countries.v1.0.0.json" with { type: "json" };
184
+ import determinationHelperCategoriesSot from "./determinationHelperCategories.v1.0.0.json" with { type: "json" };
183
185
  import traffickingRelevantRoleSot from "./traffickingRelevantRole.v1.0.0.json" with { type: "json" };
184
186
  // Domains that were never exported from this barrel (found by the CVC drift gate).
185
187
  import activityTypeSot from "./activityType.v1.0.0.json" with { type: "json" };
@@ -373,6 +375,8 @@ export {
373
375
  serviceDeliveryChannelSot,
374
376
  whyNotsSot,
375
377
  citizenshipSot,
378
+ countriesSot,
379
+ determinationHelperCategoriesSot,
376
380
  traffickingRelevantRoleSot,
377
381
  activityTypeSot,
378
382
  assertionDomainSot,
@@ -2,6 +2,15 @@
2
2
  "domain": "person_relationships",
3
3
  "name": "Core Person Relationships",
4
4
  "version": "1.0.0",
5
+ "_status": {
6
+ "vocabStatus": "canonical",
7
+ "authoredBy": "CVC-126 imported from the Notion codebook (`Final CVCs/Linking & Relationships (IC-13)/core person relationship CVC`, CVC_INDEX.md row `core person relationship CVC` = 126). Engineer-direct, 2026-08-29 (ships in the next release): APPENDS 3 relationship types + 2 directional roles the canonical prototype's relationship picker offers and the Notion-side export does not yet carry. Envelope `version` is deliberately UNCHANGED at 1.0.0: this is a purely additive append with every prior positional code stable, which is the CVC-136 0.8.17 append precedent (`coreIndicators.v1.0.0.json`, +1 code, version held). The renumber precedent (`housingSubsidyTypes`, 233 -> 194) is the one that bumps, because every code there moved.",
8
+ "evidence": "prototype@622410b `HTI-LEADS-PAVE-Thread-prototype.html` L121814-121993 (`REL_CATEGORIES`). At that pin the picker enumerates 33 relationship types across 7 categories; this codebook carried 30. The 3-type delta is exactly `parental_figure_dependent` (Familial / Kin), `intimate_romantic_partner` and `intimate_partner_prior` (Intimate / Partner).",
9
+ "localExtension": "`parental_figure_dependent` (126-001-007) with its 2 directional roles, `intimate_romantic_partner` (126-002-003) and `intimate_partner_prior` (126-002-004) are AUTHORED, not carried — all 5 are flagged `localExtension: true` so reporting can separate them. The canonical HTML flags the two Intimate entries itself: its inline comments at L121850-121885 say each `is not yet in the Notion-side 'core - person relationships' codebook export at 'Final CVCs/Linking & Relationships (IC-13)/'` and name the Crysta-led canonicalization as a queued follow-up (tracker row `RWT-NEW-intimate-partner-prior-canonicalize`). `parental_figure_dependent` carries no such inline note but is absent from this codebook for the same reason and is treated identically. PENDING canonical Notion authoring + steward ratification of titles/definitions. Structural precedent: CVC-47 serviceDeliveryChannel's `group_inperson` / `group_remote` (047-006 / 047-007) and CVC-181 countries' `non_us_unspecified` (181-250) — flagged, codebook-absent leaves appended after the enumerated set. Upstream must adopt or reject all three.",
10
+ "ordinals": "APPENDED, never interleaved. Segment-3 ordinals inside a topic are otherwise alphabetical by key, so alphabetical insertion would have put `parental_figure_dependent` at 126-001-005 and reshuffled `parent_child` / `sibling`. New types are appended at the end of their topic (126-001-007 after `sibling`; 126-002-003 / 126-002-004 after `spouse_partner`) so every previously issued positional code stays stable — the same rule CVC-136 states for its appends. Consumers persist KEYS, not wire codes, so the appends are additive in both directions.",
11
+ "roleStructure": "Unchanged by this append: an ASYMMETRIC type carries 2 level-3 directional role children ordered alphabetically by key (`guardian_dependent` -> `dependent_of` / `guardian_of`); a SYMMETRIC type carries none (`sibling`, `spouse_partner`, `dating_relationship`, ...). `parental_figure_dependent` is asymmetric and so mirrors `guardian_dependent` exactly; `intimate_romantic_partner` and `intimate_partner_prior` are symmetric in the canonical picker (`symmetric: true`) and so carry no role children."
12
+ },
13
+ "_source": "htilabstech/prototype@622410b HTI-LEADS-PAVE-Thread-prototype.html L121814-121993 (`REL_CATEGORIES`) — reference for the 3 appended types only; the 30 pre-existing types remain sourced from the Notion codebook",
5
14
  "levels": {
6
15
  "0": "Unknown or Missing",
7
16
  "1": "Topic",
@@ -51,7 +60,8 @@
51
60
  "126-001-003-000-000-000-000",
52
61
  "126-001-004-000-000-000-000",
53
62
  "126-001-005-000-000-000-000",
54
- "126-001-006-000-000-000-000"
63
+ "126-001-006-000-000-000-000",
64
+ "126-001-007-000-000-000-000"
55
65
  ],
56
66
  "definition": "Relationships between two people who are related through family or kinship, including immediate and extended family."
57
67
  },
@@ -172,6 +182,39 @@
172
182
  "childCodes": [],
173
183
  "definition": "A relationship between two people who share a sibling relationship."
174
184
  },
185
+ {
186
+ "code": "126-001-007-000-000-000-000",
187
+ "key": "parental_figure_dependent",
188
+ "title": "Parental figure / Dependent",
189
+ "selectable": true,
190
+ "parentCode": "126-001-000-000-000-000-000",
191
+ "childCodes": [
192
+ "126-001-007-001-000-000-000",
193
+ "126-001-007-002-000-000-000"
194
+ ],
195
+ "definition": "LOCAL EXTENSION (not in canonical CVC-126). A relationship where one person functions as a parental figure to the other: adult-child caretaking is clear, but the biological, adoptive, step, or legal-guardianship basis is unknown or not asserted. DISTINCT from `parent_child` (the parental basis IS known or asserted) and from `guardian_dependent` (legal or functional guardianship is the key fact) — this leaf carries the positive fact that a parental caretaking role exists WITHOUT claiming which basis produces it, which neither of those two can express. Asymmetric: the two directional roles are carried as level-3 children, mirroring `guardian_dependent`.",
196
+ "localExtension": true
197
+ },
198
+ {
199
+ "code": "126-001-007-001-000-000-000",
200
+ "key": "dependent_of_parental_figure",
201
+ "title": "Dependent",
202
+ "selectable": true,
203
+ "parentCode": "126-001-007-000-000-000-000",
204
+ "childCodes": [],
205
+ "definition": "LOCAL EXTENSION (not in canonical CVC-126). Use when the related person is the dependent of the anchor person's parental figure — i.e. the anchor person acts as the parental figure on this link. Distinct key from `dependent_of` (126-001-002-001), which is the guardianship-based role.",
206
+ "localExtension": true
207
+ },
208
+ {
209
+ "code": "126-001-007-002-000-000-000",
210
+ "key": "parental_figure_of",
211
+ "title": "Parental figure",
212
+ "selectable": true,
213
+ "parentCode": "126-001-007-000-000-000-000",
214
+ "childCodes": [],
215
+ "definition": "LOCAL EXTENSION (not in canonical CVC-126). Use when the related person is the parental figure of the anchor person.",
216
+ "localExtension": true
217
+ },
175
218
  {
176
219
  "code": "126-002-000-000-000-000-000",
177
220
  "key": "romantic_partner",
@@ -180,7 +223,9 @@
180
223
  "parentCode": null,
181
224
  "childCodes": [
182
225
  "126-002-001-000-000-000-000",
183
- "126-002-002-000-000-000-000"
226
+ "126-002-002-000-000-000-000",
227
+ "126-002-003-000-000-000-000",
228
+ "126-002-004-000-000-000-000"
184
229
  ],
185
230
  "definition": "Relationship between two people who are or were in a romantic or intimate partnership."
186
231
  },
@@ -202,6 +247,26 @@
202
247
  "childCodes": [],
203
248
  "definition": "Intimate partner relationship, including spouse, domestic partner, or romantic partner. Legal status and current/former status are modeled elsewhere (e.g., marital_status_legal, relationship_status_current, time_scope)."
204
249
  },
250
+ {
251
+ "code": "126-002-003-000-000-000-000",
252
+ "key": "intimate_romantic_partner",
253
+ "title": "Intimate / Romantic Partner",
254
+ "selectable": true,
255
+ "parentCode": "126-002-000-000-000-000-000",
256
+ "childCodes": [],
257
+ "definition": "LOCAL EXTENSION (not in canonical CVC-126). Generic romantic-partner type that stays shape-stable across both marital postures: the legally-married vs. dating distinction is captured on the relationship ROW (`is_current_spouse`, `attributes.ties[] = LEGALLY_MARRIED`) rather than by the relationship type, so a partnership does not have to change type when its legal posture changes. The Households & Relationships \"Romantic Partner\" tile hard-locks to this code. Symmetric — an intimate partnership is mutual — so no directional role children. Prefer `spouse_partner` or `dating_relationship` when the asserted fact IS the marital or dating posture itself. Added upstream 2026-05-05 (H&R Phase 2, TILE_RULES extension).",
258
+ "localExtension": true
259
+ },
260
+ {
261
+ "code": "126-002-004-000-000-000-000",
262
+ "key": "intimate_partner_prior",
263
+ "title": "Former intimate partner",
264
+ "selectable": true,
265
+ "parentCode": "126-002-000-000-000-000-000",
266
+ "childCodes": [],
267
+ "definition": "LOCAL EXTENSION (not in canonical CVC-126). Use when an intimate partnership has ENDED. The \"prior\" semantic stays canonically derivable from the relationship row (`relationship_is_active: false` + `relationship_end`); this leaf exists so the picker and the label resolver recognise the code as an Intimate-category type and render \"Former intimate partner\" instead of falling back to the raw code. For active partnerships use `spouse_partner`, `dating_relationship`, or `intimate_romantic_partner` with the appropriate active/end attributes. Symmetric, so no directional role children. Added upstream 2026-05-26 (RWT-NEW-hector-audit-atomic-fixes Fix B); upstream tracker row `RWT-NEW-intimate-partner-prior-canonicalize` proposes either renaming to `spouse_partner` + scope=prior or promoting this code into the codebook.",
268
+ "localExtension": true
269
+ },
205
270
  {
206
271
  "code": "126-003-000-000-000-000-000",
207
272
  "key": "care_household",
@@ -1,54 +1,63 @@
1
1
  {
2
2
  "domain": "relationship_concern",
3
- "name": "Core Relationship Concern (PROVISIONAL CVC-231 — pending codebook ratification)",
4
- "version": "1.0.0",
3
+ "name": "Core Relationship Concern (PROVISIONAL CVC-991 — pending codebook ratification)",
4
+ "version": "1.1.0",
5
+ "_status": {
6
+ "vocabStatus": "provisional-pending-notion-ratification",
7
+ "authoredBy": "platform-common 0.8.1 (`feature/cvc-author-missing-domains`), originally minted at provisional CVC-231. RENUMBERED 231 -> 991 engineer-direct on 2026-08-29 (ships in the next release).",
8
+ "renumber": "RENUMBERED FROM PROVISIONAL 231 ON CVC-231'S RATIFICATION TO THE DETERMINATION HELPER CATEGORIES, 2026-08-28 (Jevon). 231 was never this vocabulary's number — it was a provisional mint taken from the CANONICAL block (<900) at a time when `CVC_INDEX.md` carried no row for it, which is why this domain sat in the drift gate's `INDEX_ABSENT` list rather than in `CANONICAL_BINDING`. With 231 now ratified to the Determination Helper categories, holding it here would be a SQUAT in the exact sense GATE C describes: a wrong number does not merely mislabel the squatter, it makes the slot look occupied and thereby hides the absence of the domain that owns it (`housing_subsidy_types` on CVC-233 is the precedent that cost us `core-DH_state` entirely). Vacating 231 now, BEFORE the next `cvcIndex` pin refresh publishes the DH row, keeps that failure mode from ever arming. This domain has no canonical number of its own, so it moves to the provisional 900-block — the sanctioned escape hatch — rather than to another canonical number.",
9
+ "numberChoice": "991 = the next number above the highest provisional in use (990 `criminal_org_category`). The 900-block gaps below it are NOT free-for-reuse: 930 is claimed by the open `codebook-bridge/proposals/evidence_tier.v1.0.0.json`, and 964 / 981 are VACATED numbers (`assertion_domain` renumbered 964 -> canonical 159; `risk_band` withdrawn at 981 in favour of canonical CVC-238) which the house has deliberately left as historical gaps rather than recycled — the same stable-ordinal discipline `assertionDomain._status` states for its segment-2 gaps. 991 itself was briefly held by `core_information_scope` on the `feat/cvc-236-information-scope` branch and released within that same PR (f9a71b3, \"number core_information_scope at its canonical 236, not provisional 991\"); it never shipped in any release, so it is clean. Verified collision-free against every `src/cvcs/*.json`, `codebook-bridge/proposals/*.json`, and `cvcIndex.pin.json` (which carries no row for 231, 990, 991 or 992).",
10
+ "consumerImpact": "NONE at the type level. Consumers persist KEYS, not wire codes: PAVE binds this domain as `RELATIONSHIP_CONCERNS_KEYS = keysExceptRoot(RelationshipConcernKeys)` and every downstream `z.enum(...)` / Mongoose enum is over those keys. A repo-wide grep of pave-2.0 finds ZERO occurrences of a `\"231-...\"` positional code; the numeral appears only in prose comments and ADR text. Only the generated map VALUES change (`231-*` -> `991-*`) — the key identifiers and TypeScript types are unchanged. Regenerate `src/generated/cvc-enums.ts` (`npm run codegen:cvc`). No production data exists.",
11
+ "ordinals": "Segment-2 ordinals are preserved verbatim across the renumber (001..007 substantive, 000-000-001/002/003 missingness), so the diff is a pure prefix substitution and stays reviewable.",
12
+ "upstreamReconciliation": "Two things. (1) Notion must author this vocabulary and assign it a canonical number, at which point it renumbers out of the 900-block the way `assertion_domain` (964 -> 159) and `core_information_scope` (991 -> 236) did. (2) The Determination Helper categories now own CVC-231 and are NOT authored in platform-common at all — the same gap-behind-a-squat this renumber exists to expose. Authoring them at 231 is a separate item."
13
+ },
5
14
  "levels": {
6
15
  "0": "Unknown or Missing",
7
16
  "1": "Relationship concern"
8
17
  },
9
18
  "entries": [
10
19
  {
11
- "code": "231-000-000-000-000-000-000",
20
+ "code": "991-000-000-000-000-000-000",
12
21
  "key": "missingness_root",
13
22
  "title": "Unknown, Redacted, or Missing",
14
23
  "selectable": false,
15
24
  "parentCode": null,
16
25
  "childCodes": [
17
- "231-000-000-000-000-000-001",
18
- "231-000-000-000-000-000-002",
19
- "231-000-000-000-000-000-003"
26
+ "991-000-000-000-000-000-001",
27
+ "991-000-000-000-000-000-002",
28
+ "991-000-000-000-000-000-003"
20
29
  ],
21
30
  "definition": "Root group for values indicating absent, withheld, or uncollected data."
22
31
  },
23
32
  {
24
- "code": "231-000-000-000-000-000-001",
33
+ "code": "991-000-000-000-000-000-001",
25
34
  "key": "unknown",
26
35
  "title": "Unknown",
27
36
  "selectable": true,
28
- "parentCode": "231-000-000-000-000-000-000",
37
+ "parentCode": "991-000-000-000-000-000-000",
29
38
  "childCodes": [],
30
39
  "definition": "The relationship concern is unknown or cannot be determined from the available information."
31
40
  },
32
41
  {
33
- "code": "231-000-000-000-000-000-002",
42
+ "code": "991-000-000-000-000-000-002",
34
43
  "key": "anonymous",
35
44
  "title": "Anonymous / declined to answer",
36
45
  "selectable": true,
37
- "parentCode": "231-000-000-000-000-000-000",
46
+ "parentCode": "991-000-000-000-000-000-000",
38
47
  "childCodes": [],
39
48
  "definition": "The relationship concern may be withheld by preference or due to redaction; identity is anonymous or redacted."
40
49
  },
41
50
  {
42
- "code": "231-000-000-000-000-000-003",
51
+ "code": "991-000-000-000-000-000-003",
43
52
  "key": "data_not_collected",
44
53
  "title": "Data not collected",
45
54
  "selectable": true,
46
- "parentCode": "231-000-000-000-000-000-000",
55
+ "parentCode": "991-000-000-000-000-000-000",
47
56
  "childCodes": [],
48
57
  "definition": "No attempt was made to collect the relationship concern."
49
58
  },
50
59
  {
51
- "code": "231-001-000-000-000-000-000",
60
+ "code": "991-001-000-000-000-000-000",
52
61
  "key": "appears_controlling",
53
62
  "title": "Appears controlling",
54
63
  "selectable": true,
@@ -57,7 +66,7 @@
57
66
  "definition": "Employer, intimate partner, or family member who appears controlling in relation to the subject."
58
67
  },
59
68
  {
60
- "code": "231-002-000-000-000-000-000",
69
+ "code": "991-002-000-000-000-000-000",
61
70
  "key": "is_much_older",
62
71
  "title": "Is much older (age-disparate)",
63
72
  "selectable": true,
@@ -66,7 +75,7 @@
66
75
  "definition": "Significant age disparity in the relationship — a vulnerability signal, especially for youth."
67
76
  },
68
77
  {
69
- "code": "231-003-000-000-000-000-000",
78
+ "code": "991-003-000-000-000-000-000",
70
79
  "key": "physically_abusive",
71
80
  "title": "Physically abusive",
72
81
  "selectable": true,
@@ -75,7 +84,7 @@
75
84
  "definition": "Reports of physical harm or abuse from this person toward the subject."
76
85
  },
77
86
  {
78
- "code": "231-004-000-000-000-000-000",
87
+ "code": "991-004-000-000-000-000-000",
79
88
  "key": "emotionally_abusive",
80
89
  "title": "Emotionally abusive / threatening",
81
90
  "selectable": true,
@@ -84,7 +93,7 @@
84
93
  "definition": "Emotional abuse, threats, or intimidation by this person toward the subject."
85
94
  },
86
95
  {
87
- "code": "231-005-000-000-000-000-000",
96
+ "code": "991-005-000-000-000-000-000",
88
97
  "key": "has_legal_involvement",
89
98
  "title": "Has relevant legal involvement",
90
99
  "selectable": true,
@@ -93,7 +102,7 @@
93
102
  "definition": "This person has a legal case, protective order, or criminal history relevant to the subject's situation."
94
103
  },
95
104
  {
96
- "code": "231-006-000-000-000-000-000",
105
+ "code": "991-006-000-000-000-000-000",
97
106
  "key": "is_known_trafficker_or_suspect",
98
107
  "title": "Is known or suspected trafficker",
99
108
  "selectable": true,
@@ -102,7 +111,7 @@
102
111
  "definition": "This person is suspected or confirmed as a trafficker in relation to the subject. Complements (does not replace) role assignment via Add-Person."
103
112
  },
104
113
  {
105
- "code": "231-007-000-000-000-000-000",
114
+ "code": "991-007-000-000-000-000-000",
106
115
  "key": "other_concern",
107
116
  "title": "Other concern",
108
117
  "selectable": true,