@htilabs/platform-common-models 0.14.0 → 0.15.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 (35) hide show
  1. package/dist/{cvcEntry-0BIB9sen.d.cts → cvcEntry-DaDrEuTa.d.cts} +44 -44
  2. package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-DaDrEuTa.d.ts} +44 -44
  3. package/dist/cvcs/index.cjs +116 -25
  4. package/dist/cvcs/index.cjs.map +1 -1
  5. package/dist/cvcs/index.d.cts +124 -30
  6. package/dist/cvcs/index.d.ts +124 -30
  7. package/dist/cvcs/index.js +116 -25
  8. package/dist/cvcs/index.js.map +1 -1
  9. package/dist/enums/index.cjs +1 -0
  10. package/dist/enums/index.cjs.map +1 -1
  11. package/dist/enums/index.d.cts +3 -2
  12. package/dist/enums/index.d.ts +3 -2
  13. package/dist/enums/index.js +1 -0
  14. package/dist/enums/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 +117 -25
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +117 -25
  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/schemas/index.d.cts +35 -35
  26. package/dist/schemas/index.d.ts +35 -35
  27. package/package.json +27 -26
  28. package/src/__tests__/__snapshots__/cvc-sot.snap +2 -2
  29. package/src/__tests__/core-information-scope-invariant.test.ts +204 -15
  30. package/src/__tests__/cvc-sot-snapshot.test.ts +11 -7
  31. package/src/__tests__/cvc-structural.test.ts +1 -1
  32. package/src/__tests__/location-type-routing-invariant.test.ts +1 -1
  33. package/src/cvcs/{coreInformationScope.v1.0.0.json → coreInformationScope.v1.1.0.json} +113 -22
  34. package/src/cvcs/index.ts +1 -1
  35. package/src/generated/cvc-enums.ts +3 -2
@@ -48,7 +48,7 @@ __export(cvcs_exports, {
48
48
  coreDhStateSot: () => coreDhState_v1_0_0_default,
49
49
  coreFunctionsSot: () => coreFunctions_v1_0_0_default,
50
50
  coreIndicatorsSot: () => coreIndicators_v1_1_0_default,
51
- coreInformationScopeSot: () => coreInformationScope_v1_0_0_default,
51
+ coreInformationScopeSot: () => coreInformationScope_v1_1_0_default,
52
52
  coreReferralOutcomeSot: () => coreReferralOutcome_v1_0_0_default,
53
53
  countriesSot: () => countries_v1_0_0_default,
54
54
  createdBySystemSot: () => createdBySystem_v1_0_0_default,
@@ -27481,17 +27481,101 @@ var needsAssessmentChangeType_v1_0_0_default = {
27481
27481
  ]
27482
27482
  };
27483
27483
 
27484
- // src/cvcs/coreInformationScope.v1.0.0.json
27485
- var coreInformationScope_v1_0_0_default = {
27484
+ // src/cvcs/coreInformationScope.v1.1.0.json
27485
+ var coreInformationScope_v1_1_0_default = {
27486
27486
  domain: "core_information_scope",
27487
27487
  name: "Core Information Scope",
27488
- version: "1.0.0",
27489
- _status: "DRAFT: canonical number 236, self-declared by the source YAML (`cvc_id: CVC-236`); CVC_INDEX.md carries no row for it yet, so the drift gate classifies it INDEX_ABSENT. Sourced from canonical CVC-236 `core_information_scope` v2 (authored 2026-08-13, restructured 2026-08-14): 12 categories / 56 units. TWO GRAINS, deliberately modelled as hierarchy: L1 categories are the POLICY grain and are NOT selectable; L2 units are the AUTHORIZATION grain and are what an ROI or a share actually authorizes. This is the axis the sibling `roi_scope` domain deliberately omits \u2014 `roi_scope` is the flat item vocabulary, and its 27 substantive keys are a strict SUBSET of the 56 units here, with no renames and no collisions. That subset relationship is what makes adopting this domain additive: every stored ROI keeps its exact recorded meaning. `safe_locations` is CANON since CVC236-AUDIT R1 (Crysta, 2026-09-08): id and label ratified and minted in the Notion codebook; the former PROVISIONAL marker is retired. PENDING canonical Notion authoring + steward ratification.",
27490
- _source: "htilabstech/prototype/data/cvcs/core_information_scope.yaml @ 55088d44 (CVC-236 v2, restructured 2026-08-14, amended 2026-10-01; read from 46a60114; structural columns cross-checked against htilabstech/prototype/Final CVCs/System Roles, Permissions, & Account Management (IC-66)/core-information_scope \u2014 codebook.csv @ 55088d44)",
27488
+ version: "1.1.0",
27489
+ _status: 'DRAFT: canonical number 236, self-declared by the source YAML (`cvc_id: CVC-236`); CVC_INDEX.md carries no row for it yet, so the drift gate classifies it INDEX_ABSENT. Sourced from canonical CVC-236 `core_information_scope` v2 (authored 2026-08-13, restructured 2026-08-14): 12 categories / 55 live units + 2 retired tombstones. TWO GRAINS, deliberately modelled as hierarchy: L1 categories are the POLICY grain and are NOT selectable; L2 units are the AUTHORIZATION grain and are what an ROI or a share actually authorizes. This is the axis the sibling `roi_scope` domain deliberately omits \u2014 `roi_scope` is the flat item vocabulary, and every one of its 27 substantive keys resolves here, spelled identically, with no renames and no collisions. That is what makes adopting this domain a migration rather than a re-consent: a stored ROI never WIDENS. RETIRED TOMBSTONES: `screen_notes` (236-005-001, retired 2026-10-05, Narrative notes, signed Spec v2 rule 5); `background` (236-005-003, retired 2026-10-05, Narrative notes, signed Spec v2 rule 5). Each keeps its published code (never reused), is `selectable: false` + `retired: true`, and includes nothing: a stored ROI or share that names one resolves to "retired", not "unknown". Unit codes follow the generator\'s frozen ledger, not canon\'s display order: a new unit APPENDS inside its category. VERSION 1.1.0 supersedes 1.0.0 because the change is not additive (see `_supersedes`); neither version was seeded in platform-prod or platform-dev when it was minted (checked 2026-10-06), so the bump is the convention (ADR-CVC-0.8.13 Addendum 2026-10-05), not a guard-driven fix. `safe_locations` is CANON since CVC236-AUDIT R1 (Crysta, 2026-09-08): id and label ratified and minted in the Notion codebook; the former PROVISIONAL marker is retired. The Notion codebook is AHEAD of the yaml mirror on `instruments` (31 rows, acknowledged via --allow-codebook-ahead and not exported here), pending its own absorb lane. PENDING canonical Notion authoring + steward ratification.',
27490
+ _source: "htilabstech/prototype/data/cvcs/core_information_scope.yaml @ 9ef79748 (CVC-236 v2, restructured 2026-08-14, amended 2026-10-01; read from origin/main; structural columns cross-checked against htilabstech/prototype/Final CVCs/System Roles, Permissions, & Account Management (IC-66)/core-information_scope \u2014 codebook.csv @ 9ef79748; 2 retired codebook rows matched to the yaml's retired_units; 31 codebook-ahead rows under instruments acknowledged, not exported)",
27491
+ _supersedes: {
27492
+ version: "1.0.0",
27493
+ keyMap: {
27494
+ missingness_root: "missingness_root",
27495
+ unknown: "unknown",
27496
+ anonymous: "anonymous",
27497
+ data_not_collected: "data_not_collected",
27498
+ identifying: "identifying",
27499
+ names: "names",
27500
+ dob: "dob",
27501
+ addresses: "addresses",
27502
+ additional_ids: "additional_ids",
27503
+ demographics: "demographics",
27504
+ risk: "risk",
27505
+ screen_indicators: "screen_indicators",
27506
+ victimization: "victimization",
27507
+ ida_full: "ida_full",
27508
+ ida_consid: "ida_consid",
27509
+ initial_screen: "initial_screen",
27510
+ tra: "tra",
27511
+ lap: "lap",
27512
+ danger_assessment: "danger_assessment",
27513
+ injury_and_strangulation: "injury_and_strangulation",
27514
+ stalking_assessment: "stalking_assessment",
27515
+ ae_intake: "ae_intake",
27516
+ hope_scale: "hope_scale",
27517
+ assessment_records: "assessment_records",
27518
+ determinations: "determinations",
27519
+ offender_facilitator: "offender_facilitator",
27520
+ system_involvement: "system_involvement",
27521
+ derived_risk_signals: "derived_risk_signals",
27522
+ contact: "contact",
27523
+ contact_info: "contact_info",
27524
+ safe_locations: "safe_locations",
27525
+ priorities_safety: "priorities_safety",
27526
+ encounter_location: "encounter_location",
27527
+ services: "services",
27528
+ contact_history: "contact_history",
27529
+ service_history: "service_history",
27530
+ plans_goals: "plans_goals",
27531
+ notes: "notes",
27532
+ screen_notes: "screen_notes",
27533
+ case_notes: "case_notes",
27534
+ background: "background",
27535
+ health_accommodation: "health_accommodation",
27536
+ accommodation_needs: "accommodation_needs",
27537
+ disability_subtypes: "disability_subtypes",
27538
+ mental_health_status: "mental_health_status",
27539
+ substance_use_status: "substance_use_status",
27540
+ chronic_health_status: "chronic_health_status",
27541
+ hiv_status: "hiv_status",
27542
+ mental_health_screen: "mental_health_screen",
27543
+ trauma_and_coping_screen: "trauma_and_coping_screen",
27544
+ behavioral_health_intake: "behavioral_health_intake",
27545
+ immigration_legal_status: "immigration_legal_status",
27546
+ immigration_status: "immigration_status",
27547
+ uscis_alien_number: "uscis_alien_number",
27548
+ federal_protection_applications: "federal_protection_applications",
27549
+ tvap_enrollment: "tvap_enrollment",
27550
+ le_report_status: "le_report_status",
27551
+ system: "system",
27552
+ system_info: "system_info",
27553
+ network_associations: "network_associations",
27554
+ network_membership: "network_membership",
27555
+ persona_links: "persona_links",
27556
+ commercial_activity: "commercial_activity",
27557
+ ad_content: "ad_content",
27558
+ commercial_patterns: "commercial_patterns",
27559
+ investigative_work_product: "investigative_work_product",
27560
+ case_determinations: "case_determinations",
27561
+ case_lifecycle: "case_lifecycle",
27562
+ case_attachments: "case_attachments",
27563
+ object_identifiers: "object_identifiers",
27564
+ phone_identifiers: "phone_identifiers",
27565
+ object_identity_attributes: "object_identity_attributes"
27566
+ },
27567
+ retiredCodes: [],
27568
+ notes: {
27569
+ summary: "Every v1.0.0 key is still an entry in v1.1.0, at its v1.0.0 code, so `keyMap` is the identity and `retiredCodes` is empty: no code was withdrawn. Non-additive because 2 published unit(s) are now RETIRED tombstones and 1 unit(s) read narrower (notes below). Added: `session_summary` (236-005-004).",
27570
+ screen_notes: "v1.0.0 `screen_notes` was a selectable unit. Retired 2026-10-05 (Narrative notes, signed Spec v2 rule 5): The Initial Screen's notes box is an instrument note and belongs to the Initial Screen. It stays at 236-005-001 as a tombstone (`selectable: false`, `retired: true`) with NO successor key, and includes nothing \u2014 a stored ROI or share that names it narrows, never widens. Canon records that only demo data named it (Crysta 2026-10-04); the demo presets were rewritten by hand.",
27571
+ background: "v1.0.0 `background` was a selectable unit. Retired 2026-10-05 (Narrative notes, signed Spec v2 rule 5): Nothing ever captured it. It stays at 236-005-003 as a tombstone (`selectable: false`, `retired: true`) with NO successor key, and includes nothing \u2014 a stored ROI or share that names it narrows, never widens. Canon records that only demo data named it (Crysta 2026-10-04); the demo presets were rewritten by hand.",
27572
+ case_notes: "v1.0.0 `case_notes` ('Detailed case notes') keeps 236-005-002 but reads NARROWER under its new label 'Session & case notes' (renamed + narrowed 2026-10-02, Crysta; signed 2026-10-05, Narrative notes Spec v2 rule 5): every note whose home is a session of the case or the case itself, OTHER THAN the session summary, with its files. The session summary (the typed summary and each note marked 'Include in session summary') now rides the new `session_summary` unit (236-005-004), and a note written inside an instrument, in the Determination notes box, or in a notes box on another record belongs to that record. A stored ROI or share that authorized `case_notes` therefore no longer includes the session summary; whether it should also gain `session_summary` is a consent question for the consumer, not a mapping."
27573
+ }
27574
+ },
27491
27575
  levels: {
27492
27576
  "0": "Unknown or Missing",
27493
27577
  "1": "Category (policy grain, not selectable)",
27494
- "2": "Information unit (authorization grain, selectable)"
27578
+ "2": "Information unit (authorization grain; selectable unless retired)"
27495
27579
  },
27496
27580
  entries: [
27497
27581
  {
@@ -27907,10 +27991,11 @@ var coreInformationScope_v1_0_0_default = {
27907
27991
  selectable: true,
27908
27992
  parentCode: "236-002-000-000-000-000-000",
27909
27993
  childCodes: [],
27910
- definition: "Offender + facilitator records. Category `risk`. Carries TRA perpetrator records (ruled 2026-08-14): content wins \u2014 third-party identity never rides a subject-instrument disclosure silently.",
27994
+ definition: "Offender + facilitator records. Category `risk`. Carries TRA perpetrator records (ruled 2026-08-14): content wins \u2014 third-party identity never rides a subject-instrument disclosure silently. | THREAD ADDED 2026-10-01 (OFFENDER-SYSTEM-UNITS-THREAD, Crysta R1 \u2014 Nate Luginbill's Question set 2 item 4): app_relevance follows where the unit's content is captured, and Thread captures perpetrator records (identity \xB7 description \xB7 vehicle \xB7 violence history in PAVE 2.0's Thread; in the prototype a relevant person with the offender role-in-case + the Priorities Q1 source of the danger). The 2026-08-14 rule was never Thread-exempt \u2014 Thread had no box, so perpetrator identity rode under the victim's `names`; with the box it rides HERE and comes out of names (R2). The offender PROFILE never rides under system_involvement because a protection order names them (R3).",
27911
27995
  levelFloor: 3,
27912
27996
  appRelevance: [
27913
27997
  "PAVE",
27998
+ "Thread",
27914
27999
  "LEADS"
27915
28000
  ],
27916
28001
  shareableDefault: true,
@@ -27923,10 +28008,11 @@ var coreInformationScope_v1_0_0_default = {
27923
28008
  selectable: true,
27924
28009
  parentCode: "236-002-000-000-000-000-000",
27925
28010
  childCodes: [],
27926
- definition: "System involvement. Category `risk`.",
28011
+ definition: "System involvement. Category `risk`. THREAD ADDED 2026-10-01 (OFFENDER-SYSTEM-UNITS-THREAD, Crysta R1): Thread captures protection orders and system-involvement answers in PAVE 2.0; the [PAVE] flag was the record as of 2026-08-14. R3 (protection orders \u2014 canon holds, no split): a protection order is ONE record under this unit, whole \u2014 the survivor's legal protection (petitioner \xB7 court \xB7 status \xB7 expiry \xB7 violations) with the respondent's name as it appears on the order, a court document; an offender profile may REFERENCE the order (the ADR's 'offender-bundle extension' is a presentation), but the order is delivered only when this unit is granted \u2014 a reference carries no content, the referenced record rides its own unit (the 2026-10-01 safety-plan reference rule).",
27927
28012
  levelFloor: 3,
27928
28013
  appRelevance: [
27929
- "PAVE"
28014
+ "PAVE",
28015
+ "Thread"
27930
28016
  ],
27931
28017
  shareableDefault: true,
27932
28018
  specialDataType: "survivor_confidential"
@@ -28059,7 +28145,7 @@ var coreInformationScope_v1_0_0_default = {
28059
28145
  selectable: true,
28060
28146
  parentCode: "236-004-000-000-000-000-000",
28061
28147
  childCodes: [],
28062
- definition: "Contact history with this agency. Category `services`. Honest-empty (\xA7 5.4): no canonical UDD field carries the interaction register yet.",
28148
+ definition: "Contact history with this agency. Category `services`. DELIVERS since 2026-10-01 (CONTACT-HISTORY-REGISTER, Crysta R1\u2013R3 \u2014 Nate Luginbill's Question set 2 item 3; honest-empty from 2026-08-14 to that date): the register of this agency's own contacts with the person \u2014 one row per session, date \xB7 channel (CVC-47) \xB7 kind of sitting (CVC-217) \xB7 the agency/program as recorded, plus a count line \u2014 computed from the SENDING agency's session records at send time by the one as-delivered builder, never stored (UDD person.contact_history, derived \xB7 accumulating_log \xB7 IC-76; source fields capture.session_started_at \xB7 capture.service_delivery_channel [its session-record store `contact_method`] \xB7 capture.session_template). The fact of contact, not content: no notes, answers, outcomes or services \u2014 service_history carries the service instances (the Thread session-as-service row is the same session's other view). Which sessions: closed plus the sending one; drafts from other days, discarded sessions, inbound-share reviews (origin claimed_share), other agencies' sessions (knowing is not telling) and LEADS sessions never ride. No domain_map row \u2014 sessions are no-CAR facts; the coverage gate reads the crosswalk derived_units entry (field + store + builder marker). Presets: Thread risk_only_handoff (carried it throughout) \xB7 ROI full_collab gains it 2026-10-01 (derivation for veto). Smoke FLOW-381.",
28063
28149
  levelFloor: 3,
28064
28150
  appRelevance: [
28065
28151
  "PAVE",
@@ -28109,9 +28195,10 @@ var coreInformationScope_v1_0_0_default = {
28109
28195
  childCodes: [
28110
28196
  "236-005-001-000-000-000-000",
28111
28197
  "236-005-002-000-000-000-000",
28112
- "236-005-003-000-000-000-000"
28198
+ "236-005-003-000-000-000-000",
28199
+ "236-005-004-000-000-000-000"
28113
28200
  ],
28114
- definition: "Narrative notes \u2014 policy-grain category. Units under it are the authorization grain. LEADS flag dropped 2026-08-14 (all units PAVE/Thread \u2014 was an empty shell for LEADS-only agencies).",
28201
+ definition: "Narrative notes \u2014 policy-grain category. Units under it are the authorization grain. LEADS flag dropped 2026-08-14 (all units PAVE/Thread \u2014 was an empty shell for LEADS-only agencies). | NARRATIVE-NOTES 2026-10-05 (signed Spec v2, rule 5 \u2014 Crysta: 'Narrative notes - I've signed off on this spec.'): two sub-categories, Session summary and Session & case notes. It holds only the notes whose home is a session of the case or the case itself; a note written inside an instrument, in the Determination notes box, or in a notes box on another record belongs to that record.",
28115
28202
  levelFloor: 3,
28116
28203
  appRelevance: [
28117
28204
  "PAVE",
@@ -28124,26 +28211,20 @@ var coreInformationScope_v1_0_0_default = {
28124
28211
  code: "236-005-001-000-000-000-000",
28125
28212
  key: "screen_notes",
28126
28213
  title: "Screen notes",
28127
- selectable: true,
28214
+ selectable: false,
28128
28215
  parentCode: "236-005-000-000-000-000-000",
28129
28216
  childCodes: [],
28130
- definition: "Screen notes. Category `notes`.",
28131
- levelFloor: 3,
28132
- appRelevance: [
28133
- "PAVE",
28134
- "Thread"
28135
- ],
28136
- shareableDefault: true,
28137
- specialDataType: "survivor_confidential"
28217
+ definition: "RETIRED 2026-10-05 (Narrative notes, signed Spec v2 rule 5). The Initial Screen's notes box is an instrument note and belongs to the Initial Screen. No longer offered in share policy, internal viewing settings or a release; a stored code resolves here so a reader can tell retired from unknown, and includes nothing.",
28218
+ retired: true
28138
28219
  },
28139
28220
  {
28140
28221
  code: "236-005-002-000-000-000-000",
28141
28222
  key: "case_notes",
28142
- title: "Detailed case notes",
28223
+ title: "Session & case notes",
28143
28224
  selectable: true,
28144
28225
  parentCode: "236-005-000-000-000-000-000",
28145
28226
  childCodes: [],
28146
- definition: "Detailed case notes. Category `notes`.",
28227
+ definition: "Session & case notes. Category `notes`. RENAMED + NARROWED 2026-10-02 (Crysta; was 'Detailed case notes'; the code is unchanged). Every note whose home is a session of the case or the case itself, other than the session summary, with its files. Read from the notes store, one row per note, through the note's own visibility; the session_note / log_entry claims keep their viewing rows in domain_map and are never share content.",
28147
28228
  levelFloor: 3,
28148
28229
  appRelevance: [
28149
28230
  "PAVE",
@@ -28156,10 +28237,20 @@ var coreInformationScope_v1_0_0_default = {
28156
28237
  code: "236-005-003-000-000-000-000",
28157
28238
  key: "background",
28158
28239
  title: "Background information",
28240
+ selectable: false,
28241
+ parentCode: "236-005-000-000-000-000-000",
28242
+ childCodes: [],
28243
+ definition: "RETIRED 2026-10-05 (Narrative notes, signed Spec v2 rule 5). Nothing ever captured it. No longer offered in share policy, internal viewing settings or a release; a stored code resolves here so a reader can tell retired from unknown, and includes nothing.",
28244
+ retired: true
28245
+ },
28246
+ {
28247
+ code: "236-005-004-000-000-000-000",
28248
+ key: "session_summary",
28249
+ title: "Session summary",
28159
28250
  selectable: true,
28160
28251
  parentCode: "236-005-000-000-000-000-000",
28161
28252
  childCodes: [],
28162
- definition: "Background information. Category `notes`.",
28253
+ definition: "Session summary. Category `notes`. MINTED 2026-10-02 (Crysta: two sub-categories \u2014 'Agree'); in the apps since 2026-10-05 (NARRATIVE-NOTES). Includes the typed session summary (one note marked as the summary \u2014 it has no visibility of its own and freezes when the session is submitted) and each note whose home is that session and that the advocate marked 'Include in session summary'. A marked note from another home shows in the on-screen summary and is included in a share only with its own home, never here.",
28163
28254
  levelFloor: 3,
28164
28255
  appRelevance: [
28165
28256
  "PAVE",