@htilabs/platform-common-models 0.12.1 → 0.12.2

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-ctHTp2df.d.cts} +36 -36
  2. package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-ctHTp2df.d.ts} +36 -36
  3. package/dist/cvcs/index.cjs +224 -0
  4. package/dist/cvcs/index.cjs.map +1 -1
  5. package/dist/cvcs/index.d.cts +511 -270
  6. package/dist/cvcs/index.d.ts +511 -270
  7. package/dist/cvcs/index.js +223 -0
  8. package/dist/cvcs/index.js.map +1 -1
  9. package/dist/enums/index.cjs +16 -0
  10. package/dist/enums/index.cjs.map +1 -1
  11. package/dist/enums/index.d.cts +21 -1
  12. package/dist/enums/index.d.ts +21 -1
  13. package/dist/enums/index.js +15 -0
  14. package/dist/enums/index.js.map +1 -1
  15. package/dist/{index-CDoqrfc1.d.ts → index-4DiJrn7y.d.ts} +1 -1
  16. package/dist/{index-Zu_mOJRn.d.cts → index-qreOzXYS.d.cts} +1 -1
  17. package/dist/index.cjs +240 -0
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +4 -4
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.js +238 -0
  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 +11 -11
  26. package/dist/schemas/index.d.ts +11 -11
  27. package/package.json +27 -26
  28. package/src/__tests__/__snapshots__/cvc-sot.snap +4 -0
  29. package/src/__tests__/cvc-drift-gate.test.ts +18 -0
  30. package/src/__tests__/cvc-sot-snapshot.test.ts +8 -0
  31. package/src/__tests__/cvc-structural.test.ts +2 -0
  32. package/src/__tests__/share-response-reason-invariant.test.ts +167 -0
  33. package/src/cvcs/index.ts +4 -0
  34. package/src/cvcs/shareResponseReason.v1.0.0.json +220 -0
  35. package/src/generated/cvc-enums.ts +22 -0
@@ -1,4 +1,4 @@
1
- import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-0BIB9sen.js';
1
+ import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-ctHTp2df.js';
2
2
  import * as mongoose from 'mongoose';
3
3
  import { HydratedDocument, Connection, Model } from 'mongoose';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-0BIB9sen.cjs';
1
+ import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-ctHTp2df.cjs';
2
2
  import * as mongoose from 'mongoose';
3
3
  import { HydratedDocument, Connection, Model } from 'mongoose';
4
4
 
package/dist/index.cjs CHANGED
@@ -440,6 +440,7 @@ __export(src_exports, {
440
440
  SeverityFollowUpKeys: () => SeverityFollowUpKeys,
441
441
  SexProviderSubroleKeys: () => SexProviderSubroleKeys,
442
442
  SharePurposeKeys: () => SharePurposeKeys,
443
+ ShareResponseReasonKeys: () => ShareResponseReasonKeys,
443
444
  SignatureMethodKeys: () => SignatureMethodKeys,
444
445
  SignatureTypeKeys: () => SignatureTypeKeys,
445
446
  SmtBodyLocationKeys: () => SmtBodyLocationKeys,
@@ -696,6 +697,7 @@ __export(src_exports, {
696
697
  severityFollowUpSot: () => severityFollowUp_v1_0_0_default,
697
698
  sexProviderSubroleSot: () => sexProviderSubrole_v1_0_0_default,
698
699
  sharePurposeSot: () => sharePurpose_v1_0_0_default,
700
+ shareResponseReasonSot: () => shareResponseReason_v1_0_0_default,
699
701
  signatureMethodSot: () => signatureMethod_v1_0_0_default,
700
702
  signatureTypeSot: () => signatureType_v1_0_0_default,
701
703
  smtBodyLocationSot: () => smtBodyLocation_v1_0_0_default,
@@ -8414,6 +8416,20 @@ var CaseShareStateKeys = {
8414
8416
  declined: "925-005-000-000-000-000-000",
8415
8417
  rejected: "925-006-000-000-000-000-000"
8416
8418
  };
8419
+ var ShareResponseReasonKeys = {
8420
+ missingness_root: "306-000-000-000-000-000-000",
8421
+ unknown: "306-000-000-000-000-000-001",
8422
+ information_incorrect: "306-001-000-000-000-000-000",
8423
+ not_relevant_for_client: "306-002-000-000-000-000-000",
8424
+ duplicate_already_have: "306-003-000-000-000-000-000",
8425
+ client_declined_recording: "306-004-000-000-000-000-000",
8426
+ wrong_agency_service_area: "306-005-000-000-000-000-000",
8427
+ not_our_client: "306-006-000-000-000-000-000",
8428
+ sent_in_error: "306-007-000-000-000-000-000",
8429
+ no_capacity: "306-008-000-000-000-000-000",
8430
+ cannot_verify_conflicts: "306-009-000-000-000-000-000",
8431
+ wrong_person: "306-010-000-000-000-000-000"
8432
+ };
8417
8433
  var FacilitatorEntityTypeKeys = {
8418
8434
  missingness_root: "165-000-000-000-000-000-000",
8419
8435
  unknown: "165-000-000-000-000-000-001",
@@ -19660,6 +19676,228 @@ var caseShareState_v1_0_0_default = {
19660
19676
  ]
19661
19677
  };
19662
19678
 
19679
+ // src/cvcs/shareResponseReason.v1.0.0.json
19680
+ var shareResponseReason_v1_0_0_default = {
19681
+ domain: "share_response_reason",
19682
+ name: "Core Share Response Reason",
19683
+ version: "1.0.0",
19684
+ _status: "CANONICAL \u2014 Notion CVC-306 `core-share_response_reason` v1.1, `vocab_status: active` (minted 2026-08-23 in the Crysta-approved steward batch; FULL AUDIT 2026-09-14, SHARING-FAMILY-AUDIT -> Active / 1.1). Exported from prototype canon @ 6c2cfc0a, where it had sat unexported. The STRUCTURED reasons a recipient gives when responding to an inbound case share: ONE codebook with per-CONTEXT selectability (`field_review` \xB7 `decline_share` \xB7 `reject_share`) carried per entry as `contexts` \u2014 a consumer building a picker for one context filters on it, never on `selectable` alone. Rulings encoded upstream (Crysta 2026-08-23): reasons are CHIPS, not prose \u2014 an optional free-text note may ride alongside, never instead (R14); reasons NEVER travel to the sender in v1 (R16); 'connected with the person and they didn't want services' is an ACCEPT + CVC-219 why-nots, never a decline (R15). WORDING (title, definition, `guidance`, `logicNotes`) is verbatim from the Notion codebook export, which the yaml mirror's own header says wins on wording; `tobyRetention` is the yaml mirror's policy-as-data column. Positional ordinals 306-001..010 are MINTED in codebook row order (the codebook's Code column carries slugs only) and FROZEN at that key assignment: a new reason appends at 306-011+, a published code is never renumbered or reused. MISSINGNESS is canon's v1.1 shape: ONE ingestion-only sentinel, UNK (key `unknown`, `canonicalCode: UNK`, `selectable: false` \u2014 canon: never a picker chip; a reason is required at the act). The codebook's archived row(s) DNC (\"Not a value; never emit\") are OMITTED entirely \u2014 no code is assigned, and none ever shipped in a platform-common release. NUMBER: self-declared `cvc_id: CVC-306` and carried by upstream CVC_INDEX.md (`core-share_response_reason`), but the cvcIndex pin (622410b) predates that row, so the drift gate files this domain INDEX_ABSENT until the next pin refresh promotes it to CANONICAL_BINDING.",
19685
+ _source: "htilabstech/prototype/data/cvcs/core_share_response_reason.yaml @ 6c2cfc0a + htilabstech/prototype/Final CVCs/Sharing (IC-65)/core - share_response_reason \u2014 codebook.csv @ 6c2cfc0a (Notion CVC-306 v1.1; read from origin/main)",
19686
+ contexts: {
19687
+ field_review: "Field review",
19688
+ decline_share: "Decline share",
19689
+ reject_share: "Reject share"
19690
+ },
19691
+ levels: {
19692
+ "0": "Unknown or Missing",
19693
+ "1": "Share response reason"
19694
+ },
19695
+ entries: [
19696
+ {
19697
+ code: "306-000-000-000-000-000-000",
19698
+ key: "missingness_root",
19699
+ title: "Unknown, Redacted, or Missing",
19700
+ selectable: false,
19701
+ parentCode: null,
19702
+ childCodes: [
19703
+ "306-000-000-000-000-000-001"
19704
+ ],
19705
+ definition: "Root group for values indicating absent, withheld, or uncollected data. Non-standard variant (Unknown only): canonical CVC-306 v1.1 carries ONE ingestion-only sentinel (UNK, the CVC-216 R1 shape); ANON and DNC are deliberately absent, and the codebook's DNC row is [ARCHIVED]. The sentinel is never a picker chip in any context."
19706
+ },
19707
+ {
19708
+ code: "306-000-000-000-000-000-001",
19709
+ key: "unknown",
19710
+ title: "Unknown",
19711
+ selectable: false,
19712
+ parentCode: "306-000-000-000-000-000-000",
19713
+ childCodes: [],
19714
+ definition: "Unknown or cannot be determined from the available information.",
19715
+ canonicalCode: "UNK",
19716
+ contexts: [],
19717
+ guidance: null,
19718
+ logicNotes: "House missingness convention (L0) \u2014 the ONE sentinel (CVC-216 R1 shape, applied 2026-09-14): reserved for ingested share responses whose source never recorded a reason. Never a picker chip in any context (a reason is required at the act). ANON and DNC deliberately absent (declared).",
19719
+ tobyRetention: {
19720
+ class: "tombstone_retain",
19721
+ stewardFlag: true
19722
+ }
19723
+ },
19724
+ {
19725
+ code: "306-001-000-000-000-000-000",
19726
+ key: "information_incorrect",
19727
+ title: "The information is incorrect",
19728
+ selectable: true,
19729
+ parentCode: null,
19730
+ childCodes: [],
19731
+ definition: "The value is wrong \u2014 it does not match reality as the recipient knows it.",
19732
+ contexts: [
19733
+ "field_review"
19734
+ ],
19735
+ guidance: "The highest-signal code for platform accuracy learning: an explicit human judgment that the sender's record is wrong on this point.",
19736
+ logicNotes: "Sibling of core - record_removal_reason's created_in_error / value-incorrect family.",
19737
+ tobyRetention: {
19738
+ class: "supersede"
19739
+ }
19740
+ },
19741
+ {
19742
+ code: "306-002-000-000-000-000-000",
19743
+ key: "not_relevant_for_client",
19744
+ title: "Not relevant for my client",
19745
+ selectable: true,
19746
+ parentCode: null,
19747
+ childCodes: [],
19748
+ definition: "The information may be true, but it doesn't belong in this client's record for the services this agency provides.",
19749
+ contexts: [
19750
+ "field_review"
19751
+ ],
19752
+ guidance: "Deliberately distinct from information_incorrect \u2014 relevance and accuracy must never collapse into one code (the RemoveAssetFlow lesson).",
19753
+ logicNotes: null,
19754
+ tobyRetention: {
19755
+ class: "tombstone_retain"
19756
+ }
19757
+ },
19758
+ {
19759
+ code: "306-003-000-000-000-000-000",
19760
+ key: "duplicate_already_have",
19761
+ title: "Duplicate of what we have",
19762
+ selectable: true,
19763
+ parentCode: null,
19764
+ childCodes: [],
19765
+ definition: "The recipient already holds this information (or this whole share duplicates one already received).",
19766
+ contexts: [
19767
+ "field_review",
19768
+ "decline_share"
19769
+ ],
19770
+ guidance: "Field review: the incoming value adds nothing. Decline: the share as a whole duplicates a prior one.",
19771
+ logicNotes: null,
19772
+ tobyRetention: {
19773
+ class: "tombstone_retain",
19774
+ engineSignal: "same_thing"
19775
+ }
19776
+ },
19777
+ {
19778
+ code: "306-004-000-000-000-000-000",
19779
+ key: "client_declined_recording",
19780
+ title: "Client asked us not to record this",
19781
+ selectable: true,
19782
+ parentCode: null,
19783
+ childCodes: [],
19784
+ definition: "The client asked this agency not to hold this information on file.",
19785
+ contexts: [
19786
+ "field_review"
19787
+ ],
19788
+ guidance: "A consent judgment, not an accuracy judgment \u2014 platform learning must never read this as evidence the value is wrong.",
19789
+ logicNotes: "Interacts with the subpoena-exposure balancing test (GDR \xA7 5.61): the advocate is weighing legal-harm risk against service value.",
19790
+ tobyRetention: {
19791
+ class: "inclusion_register"
19792
+ }
19793
+ },
19794
+ {
19795
+ code: "306-005-000-000-000-000-000",
19796
+ key: "wrong_agency_service_area",
19797
+ title: "Wrong agency / outside our service area",
19798
+ selectable: true,
19799
+ parentCode: null,
19800
+ childCodes: [],
19801
+ definition: "This share should not have come to this agency \u2014 wrong coverage area or wrong service type.",
19802
+ contexts: [
19803
+ "decline_share"
19804
+ ],
19805
+ guidance: "Decline-only: a routing miss, decided before engaging the content.",
19806
+ logicNotes: null,
19807
+ tobyRetention: {
19808
+ class: "retain_event"
19809
+ }
19810
+ },
19811
+ {
19812
+ code: "306-006-000-000-000-000-000",
19813
+ key: "not_our_client",
19814
+ title: "Not our client",
19815
+ selectable: true,
19816
+ parentCode: null,
19817
+ childCodes: [],
19818
+ definition: "This person is not (and will not become) a client of this agency.",
19819
+ contexts: [
19820
+ "decline_share"
19821
+ ],
19822
+ guidance: "Decline-only. NOT for the turned-away scenario \u2014 if the person was actually reached and chose no services, that's an ACCEPT with offered services + why-nots recorded.",
19823
+ logicNotes: null,
19824
+ tobyRetention: {
19825
+ class: "retain_event"
19826
+ }
19827
+ },
19828
+ {
19829
+ code: "306-007-000-000-000-000-000",
19830
+ key: "sent_in_error",
19831
+ title: "Sent in error",
19832
+ selectable: true,
19833
+ parentCode: null,
19834
+ childCodes: [],
19835
+ definition: "The sender shared this by mistake (confirmed with the sender or evident from the content).",
19836
+ contexts: [
19837
+ "decline_share",
19838
+ "reject_share"
19839
+ ],
19840
+ guidance: "Available at decline (before engaging) and reject (discovered during review).",
19841
+ logicNotes: null,
19842
+ tobyRetention: {
19843
+ class: "retain_event"
19844
+ }
19845
+ },
19846
+ {
19847
+ code: "306-008-000-000-000-000-000",
19848
+ key: "no_capacity",
19849
+ title: "No capacity right now",
19850
+ selectable: true,
19851
+ parentCode: null,
19852
+ childCodes: [],
19853
+ definition: "The agency cannot take this on at the moment.",
19854
+ contexts: [
19855
+ "decline_share"
19856
+ ],
19857
+ guidance: "Decline-only; honest operational reason \u2014 the sender can re-share later (a re-claim starts fresh).",
19858
+ logicNotes: null,
19859
+ tobyRetention: {
19860
+ class: "retain_event"
19861
+ }
19862
+ },
19863
+ {
19864
+ code: "306-009-000-000-000-000-000",
19865
+ key: "cannot_verify_conflicts",
19866
+ title: "Can't verify \u2014 conflicts with the client's account",
19867
+ selectable: true,
19868
+ parentCode: null,
19869
+ childCodes: [],
19870
+ definition: "The delivered content conflicts with what the client has told this agency directly, and cannot be verified.",
19871
+ contexts: [
19872
+ "reject_share"
19873
+ ],
19874
+ guidance: "Reject-only: a whole-share trust judgment after review. High-signal for deconfliction/accuracy learning.",
19875
+ logicNotes: null,
19876
+ tobyRetention: {
19877
+ class: "retain_event"
19878
+ }
19879
+ },
19880
+ {
19881
+ code: "306-010-000-000-000-000-000",
19882
+ key: "wrong_person",
19883
+ title: "Wrong person",
19884
+ selectable: true,
19885
+ parentCode: null,
19886
+ childCodes: [],
19887
+ definition: "Review made clear the shared content is about a different person than the recipient's client.",
19888
+ contexts: [
19889
+ "reject_share"
19890
+ ],
19891
+ guidance: "Reject-only. Case identity, never person identity: the fix is rejecting the share \u2014 no cross-agency person merge exists or ever will.",
19892
+ logicNotes: null,
19893
+ tobyRetention: {
19894
+ class: "retain_event",
19895
+ engineSignal: "cross_agency_wrongness"
19896
+ }
19897
+ }
19898
+ ]
19899
+ };
19900
+
19663
19901
  // src/cvcs/facilitatorEntityType.v1.0.0.json
19664
19902
  var facilitatorEntityType_v1_0_0_default = {
19665
19903
  domain: "facilitator_entity_type",
@@ -56101,6 +56339,7 @@ var CVC_197_VALUES = selectableCodes(
56101
56339
  SeverityFollowUpKeys,
56102
56340
  SexProviderSubroleKeys,
56103
56341
  SharePurposeKeys,
56342
+ ShareResponseReasonKeys,
56104
56343
  SignatureMethodKeys,
56105
56344
  SignatureTypeKeys,
56106
56345
  SmtBodyLocationKeys,
@@ -56357,6 +56596,7 @@ var CVC_197_VALUES = selectableCodes(
56357
56596
  severityFollowUpSot,
56358
56597
  sexProviderSubroleSot,
56359
56598
  sharePurposeSot,
56599
+ shareResponseReasonSot,
56360
56600
  signatureMethodSot,
56361
56601
  signatureTypeSot,
56362
56602
  smtBodyLocationSot,