@htilabs/platform-common-models 0.12.1 → 0.12.3

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 (55) 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 +245 -4
  4. package/dist/cvcs/index.cjs.map +1 -1
  5. package/dist/cvcs/index.d.cts +533 -274
  6. package/dist/cvcs/index.d.ts +533 -274
  7. package/dist/cvcs/index.js +244 -4
  8. package/dist/cvcs/index.js.map +1 -1
  9. package/dist/enums/index.cjs +17 -0
  10. package/dist/enums/index.cjs.map +1 -1
  11. package/dist/enums/index.d.cts +24 -3
  12. package/dist/enums/index.d.ts +24 -3
  13. package/dist/enums/index.js +16 -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 +317 -11
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +6 -6
  20. package/dist/index.d.ts +6 -6
  21. package/dist/index.js +310 -11
  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.cjs +41 -7
  26. package/dist/schemas/index.cjs.map +1 -1
  27. package/dist/schemas/index.d.cts +116 -12
  28. package/dist/schemas/index.d.ts +116 -12
  29. package/dist/schemas/index.js +38 -7
  30. package/dist/schemas/index.js.map +1 -1
  31. package/dist/{cvc-Cp4uWnAa.d.cts → team-C4LJ5Tex.d.cts} +36 -1
  32. package/dist/{cvc-Cp4uWnAa.d.ts → team-C4LJ5Tex.d.ts} +36 -1
  33. package/dist/validation/index.cjs +155 -0
  34. package/dist/validation/index.cjs.map +1 -1
  35. package/dist/validation/index.d.cts +1 -1
  36. package/dist/validation/index.d.ts +1 -1
  37. package/dist/validation/index.js +153 -0
  38. package/dist/validation/index.js.map +1 -1
  39. package/package.json +27 -26
  40. package/src/__tests__/__snapshots__/cvc-sot.snap +8 -0
  41. package/src/__tests__/core-information-scope-invariant.test.ts +125 -2
  42. package/src/__tests__/cvc-drift-gate.test.ts +18 -0
  43. package/src/__tests__/cvc-sot-snapshot.test.ts +17 -0
  44. package/src/__tests__/cvc-structural.test.ts +5 -0
  45. package/src/__tests__/share-response-reason-invariant.test.ts +167 -0
  46. package/src/__tests__/team-directory-fields.test.ts +252 -0
  47. package/src/cvcs/coreInformationScope.v1.0.0.json +21 -4
  48. package/src/cvcs/index.ts +4 -0
  49. package/src/cvcs/shareResponseReason.v1.0.0.json +220 -0
  50. package/src/generated/cvc-enums.ts +25 -2
  51. package/src/index.ts +7 -0
  52. package/src/schemas/index.ts +8 -0
  53. package/src/schemas/team.ts +118 -0
  54. package/src/validation/index.ts +1 -0
  55. package/src/validation/team.ts +48 -0
@@ -7387,6 +7387,228 @@ var caseShareState_v1_0_0_default = {
7387
7387
  ]
7388
7388
  };
7389
7389
 
7390
+ // src/cvcs/shareResponseReason.v1.0.0.json
7391
+ var shareResponseReason_v1_0_0_default = {
7392
+ domain: "share_response_reason",
7393
+ name: "Core Share Response Reason",
7394
+ version: "1.0.0",
7395
+ _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.",
7396
+ _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)",
7397
+ contexts: {
7398
+ field_review: "Field review",
7399
+ decline_share: "Decline share",
7400
+ reject_share: "Reject share"
7401
+ },
7402
+ levels: {
7403
+ "0": "Unknown or Missing",
7404
+ "1": "Share response reason"
7405
+ },
7406
+ entries: [
7407
+ {
7408
+ code: "306-000-000-000-000-000-000",
7409
+ key: "missingness_root",
7410
+ title: "Unknown, Redacted, or Missing",
7411
+ selectable: false,
7412
+ parentCode: null,
7413
+ childCodes: [
7414
+ "306-000-000-000-000-000-001"
7415
+ ],
7416
+ 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."
7417
+ },
7418
+ {
7419
+ code: "306-000-000-000-000-000-001",
7420
+ key: "unknown",
7421
+ title: "Unknown",
7422
+ selectable: false,
7423
+ parentCode: "306-000-000-000-000-000-000",
7424
+ childCodes: [],
7425
+ definition: "Unknown or cannot be determined from the available information.",
7426
+ canonicalCode: "UNK",
7427
+ contexts: [],
7428
+ guidance: null,
7429
+ 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).",
7430
+ tobyRetention: {
7431
+ class: "tombstone_retain",
7432
+ stewardFlag: true
7433
+ }
7434
+ },
7435
+ {
7436
+ code: "306-001-000-000-000-000-000",
7437
+ key: "information_incorrect",
7438
+ title: "The information is incorrect",
7439
+ selectable: true,
7440
+ parentCode: null,
7441
+ childCodes: [],
7442
+ definition: "The value is wrong \u2014 it does not match reality as the recipient knows it.",
7443
+ contexts: [
7444
+ "field_review"
7445
+ ],
7446
+ guidance: "The highest-signal code for platform accuracy learning: an explicit human judgment that the sender's record is wrong on this point.",
7447
+ logicNotes: "Sibling of core - record_removal_reason's created_in_error / value-incorrect family.",
7448
+ tobyRetention: {
7449
+ class: "supersede"
7450
+ }
7451
+ },
7452
+ {
7453
+ code: "306-002-000-000-000-000-000",
7454
+ key: "not_relevant_for_client",
7455
+ title: "Not relevant for my client",
7456
+ selectable: true,
7457
+ parentCode: null,
7458
+ childCodes: [],
7459
+ definition: "The information may be true, but it doesn't belong in this client's record for the services this agency provides.",
7460
+ contexts: [
7461
+ "field_review"
7462
+ ],
7463
+ guidance: "Deliberately distinct from information_incorrect \u2014 relevance and accuracy must never collapse into one code (the RemoveAssetFlow lesson).",
7464
+ logicNotes: null,
7465
+ tobyRetention: {
7466
+ class: "tombstone_retain"
7467
+ }
7468
+ },
7469
+ {
7470
+ code: "306-003-000-000-000-000-000",
7471
+ key: "duplicate_already_have",
7472
+ title: "Duplicate of what we have",
7473
+ selectable: true,
7474
+ parentCode: null,
7475
+ childCodes: [],
7476
+ definition: "The recipient already holds this information (or this whole share duplicates one already received).",
7477
+ contexts: [
7478
+ "field_review",
7479
+ "decline_share"
7480
+ ],
7481
+ guidance: "Field review: the incoming value adds nothing. Decline: the share as a whole duplicates a prior one.",
7482
+ logicNotes: null,
7483
+ tobyRetention: {
7484
+ class: "tombstone_retain",
7485
+ engineSignal: "same_thing"
7486
+ }
7487
+ },
7488
+ {
7489
+ code: "306-004-000-000-000-000-000",
7490
+ key: "client_declined_recording",
7491
+ title: "Client asked us not to record this",
7492
+ selectable: true,
7493
+ parentCode: null,
7494
+ childCodes: [],
7495
+ definition: "The client asked this agency not to hold this information on file.",
7496
+ contexts: [
7497
+ "field_review"
7498
+ ],
7499
+ guidance: "A consent judgment, not an accuracy judgment \u2014 platform learning must never read this as evidence the value is wrong.",
7500
+ logicNotes: "Interacts with the subpoena-exposure balancing test (GDR \xA7 5.61): the advocate is weighing legal-harm risk against service value.",
7501
+ tobyRetention: {
7502
+ class: "inclusion_register"
7503
+ }
7504
+ },
7505
+ {
7506
+ code: "306-005-000-000-000-000-000",
7507
+ key: "wrong_agency_service_area",
7508
+ title: "Wrong agency / outside our service area",
7509
+ selectable: true,
7510
+ parentCode: null,
7511
+ childCodes: [],
7512
+ definition: "This share should not have come to this agency \u2014 wrong coverage area or wrong service type.",
7513
+ contexts: [
7514
+ "decline_share"
7515
+ ],
7516
+ guidance: "Decline-only: a routing miss, decided before engaging the content.",
7517
+ logicNotes: null,
7518
+ tobyRetention: {
7519
+ class: "retain_event"
7520
+ }
7521
+ },
7522
+ {
7523
+ code: "306-006-000-000-000-000-000",
7524
+ key: "not_our_client",
7525
+ title: "Not our client",
7526
+ selectable: true,
7527
+ parentCode: null,
7528
+ childCodes: [],
7529
+ definition: "This person is not (and will not become) a client of this agency.",
7530
+ contexts: [
7531
+ "decline_share"
7532
+ ],
7533
+ 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.",
7534
+ logicNotes: null,
7535
+ tobyRetention: {
7536
+ class: "retain_event"
7537
+ }
7538
+ },
7539
+ {
7540
+ code: "306-007-000-000-000-000-000",
7541
+ key: "sent_in_error",
7542
+ title: "Sent in error",
7543
+ selectable: true,
7544
+ parentCode: null,
7545
+ childCodes: [],
7546
+ definition: "The sender shared this by mistake (confirmed with the sender or evident from the content).",
7547
+ contexts: [
7548
+ "decline_share",
7549
+ "reject_share"
7550
+ ],
7551
+ guidance: "Available at decline (before engaging) and reject (discovered during review).",
7552
+ logicNotes: null,
7553
+ tobyRetention: {
7554
+ class: "retain_event"
7555
+ }
7556
+ },
7557
+ {
7558
+ code: "306-008-000-000-000-000-000",
7559
+ key: "no_capacity",
7560
+ title: "No capacity right now",
7561
+ selectable: true,
7562
+ parentCode: null,
7563
+ childCodes: [],
7564
+ definition: "The agency cannot take this on at the moment.",
7565
+ contexts: [
7566
+ "decline_share"
7567
+ ],
7568
+ guidance: "Decline-only; honest operational reason \u2014 the sender can re-share later (a re-claim starts fresh).",
7569
+ logicNotes: null,
7570
+ tobyRetention: {
7571
+ class: "retain_event"
7572
+ }
7573
+ },
7574
+ {
7575
+ code: "306-009-000-000-000-000-000",
7576
+ key: "cannot_verify_conflicts",
7577
+ title: "Can't verify \u2014 conflicts with the client's account",
7578
+ selectable: true,
7579
+ parentCode: null,
7580
+ childCodes: [],
7581
+ definition: "The delivered content conflicts with what the client has told this agency directly, and cannot be verified.",
7582
+ contexts: [
7583
+ "reject_share"
7584
+ ],
7585
+ guidance: "Reject-only: a whole-share trust judgment after review. High-signal for deconfliction/accuracy learning.",
7586
+ logicNotes: null,
7587
+ tobyRetention: {
7588
+ class: "retain_event"
7589
+ }
7590
+ },
7591
+ {
7592
+ code: "306-010-000-000-000-000-000",
7593
+ key: "wrong_person",
7594
+ title: "Wrong person",
7595
+ selectable: true,
7596
+ parentCode: null,
7597
+ childCodes: [],
7598
+ definition: "Review made clear the shared content is about a different person than the recipient's client.",
7599
+ contexts: [
7600
+ "reject_share"
7601
+ ],
7602
+ guidance: "Reject-only. Case identity, never person identity: the fix is rejecting the share \u2014 no cross-agency person merge exists or ever will.",
7603
+ logicNotes: null,
7604
+ tobyRetention: {
7605
+ class: "retain_event",
7606
+ engineSignal: "cross_agency_wrongness"
7607
+ }
7608
+ }
7609
+ ]
7610
+ };
7611
+
7390
7612
  // src/cvcs/facilitatorEntityType.v1.0.0.json
7391
7613
  var facilitatorEntityType_v1_0_0_default = {
7392
7614
  domain: "facilitator_entity_type",
@@ -26114,8 +26336,8 @@ var coreInformationScope_v1_0_0_default = {
26114
26336
  domain: "core_information_scope",
26115
26337
  name: "Core Information Scope",
26116
26338
  version: "1.0.0",
26117
- _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 / 54 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 54 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 PROVISIONAL and may be re-keyed by the Notion steward batch \u2014 pin the id with the product owner before any consumer treats it as stable. PENDING canonical Notion authoring + steward ratification.",
26118
- _source: "htilabstech/prototype data/cvcs/core_information_scope.yaml (CVC-236 v2, restructured 2026-08-14)",
26339
+ _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 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 55 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 PROVISIONAL and may be re-keyed by the Notion steward batch \u2014 pin the id with the product owner before any consumer treats it as stable. PENDING canonical Notion authoring + steward ratification.",
26340
+ _source: "htilabstech/prototype/data/cvcs/core_information_scope.yaml @ 285a9f1d (CVC-236 v2, restructured 2026-08-14, amended 2026-09-29; 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 @ 285a9f1d)",
26119
26341
  levels: {
26120
26342
  "0": "Unknown or Missing",
26121
26343
  "1": "Category (policy grain, not selectable)",
@@ -26582,9 +26804,10 @@ var coreInformationScope_v1_0_0_default = {
26582
26804
  parentCode: null,
26583
26805
  childCodes: [
26584
26806
  "236-003-001-000-000-000-000",
26585
- "236-003-002-000-000-000-000"
26807
+ "236-003-002-000-000-000-000",
26808
+ "236-003-003-000-000-000-000"
26586
26809
  ],
26587
- definition: "Contact & safety \u2014 policy-grain category. Units under it are the authorization grain. NARROWED 2026-08-14 (restructure ruling 2): contact/service history moved to the NEW services category. SUPERSEDES the 2026-08-13 deliberate-merge note; legacy `contact` grants resolve via the alias layer (CVC-69 precedent). LEADS flag dropped (no LEADS units \u2014 was an empty shell).",
26810
+ definition: "Contact & safety \u2014 policy-grain category. Units under it are the authorization grain. NARROWED 2026-08-14 (restructure ruling 2): contact/service history moved to the NEW services category. SUPERSEDES the 2026-08-13 deliberate-merge note; legacy `contact` grants resolve via the alias layer (CVC-69 precedent). LEADS flag dropped (no LEADS units \u2014 was an empty shell). | 2026-09-29 (PRIORITIES-SAFETY-SCOPE-UNIT, Crysta R1): third unit priorities_safety \u2014 the immediate-needs triage answers, one disclosure decision.",
26588
26811
  levelFloor: 3,
26589
26812
  appRelevance: [
26590
26813
  "PAVE",
@@ -26626,6 +26849,22 @@ var coreInformationScope_v1_0_0_default = {
26626
26849
  specialDataType: "survivor_confidential",
26627
26850
  platformFloor: true
26628
26851
  },
26852
+ {
26853
+ code: "236-003-003-000-000-000-000",
26854
+ key: "priorities_safety",
26855
+ title: "Priorities & Safety (immediate needs triage)",
26856
+ selectable: true,
26857
+ parentCode: "236-003-000-000-000-000-000",
26858
+ childCodes: [],
26859
+ definition: "Priorities & Safety (immediate needs triage). Category `contact`. NEW 2026-09-29 (PRIORITIES-SAFETY-SCOPE-UNIT, Crysta R1): the completed Immediate Priorities / Priorities & Safety triage, authorized as ONE disclosure decision \u2014 Q1 immediate danger + source of the danger + harm-doer nearby + safe place to go \xB7 Q2 health needs \xB7 Q3 interpreter \xB7 Q4 urgent basic needs \xB7 Q5 transportation (method / time / pickup location) \xB7 Q6 emergency shelter \xB7 Q7 dependents at risk \xB7 Q8 other. Instrument-grain unit on the initial_screen / lap precedent (ruling 1, 2026-08-13), homed under Contact & safety because the answers that had no home are safety facts; the service instances the step derives ride services/service_history on their own. Bidirectional Thread Signal \u2194 PAVE mirror on Q1 (GDR \xA7 6.9.7) \u2014 one unit, both apps. domain_map: priorities_safety \u2192 this unit (R3 EXECUTED later the same day, PRIORITIES-SAFETY-RECORD): CVC-159 domain priorities_safety (Level 1) + monolith emitter emitPrioritiesAnswerCAR (one CAR per answered question) + UDD row capture.priorities_safety; production persistence of the answers stays with Nate under RWT-NEW-priorities-safety-record-and-udd-2026-09-29. Minted in the Notion codebook the same day; codebook row re-synced to the record 2026-09-29.",
26860
+ levelFloor: 3,
26861
+ appRelevance: [
26862
+ "PAVE",
26863
+ "Thread"
26864
+ ],
26865
+ shareableDefault: true,
26866
+ specialDataType: "survivor_confidential"
26867
+ },
26629
26868
  {
26630
26869
  code: "236-004-000-000-000-000-000",
26631
26870
  key: "services",
@@ -43552,6 +43791,7 @@ export {
43552
43791
  severityFollowUp_v1_0_0_default as severityFollowUpSot,
43553
43792
  sexProviderSubrole_v1_0_0_default as sexProviderSubroleSot,
43554
43793
  sharePurpose_v1_0_0_default as sharePurposeSot,
43794
+ shareResponseReason_v1_0_0_default as shareResponseReasonSot,
43555
43795
  signatureMethod_v1_0_0_default as signatureMethodSot,
43556
43796
  signatureType_v1_0_0_default as signatureTypeSot,
43557
43797
  smtBodyLocation_v1_0_0_default as smtBodyLocationSot,