@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.
- package/dist/{cvcEntry-0BIB9sen.d.cts → cvcEntry-ctHTp2df.d.cts} +36 -36
- package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-ctHTp2df.d.ts} +36 -36
- package/dist/cvcs/index.cjs +224 -0
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +511 -270
- package/dist/cvcs/index.d.ts +511 -270
- package/dist/cvcs/index.js +223 -0
- package/dist/cvcs/index.js.map +1 -1
- package/dist/enums/index.cjs +16 -0
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.cts +21 -1
- package/dist/enums/index.d.ts +21 -1
- package/dist/enums/index.js +15 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/{index-CDoqrfc1.d.ts → index-4DiJrn7y.d.ts} +1 -1
- package/dist/{index-Zu_mOJRn.d.cts → index-qreOzXYS.d.cts} +1 -1
- package/dist/index.cjs +240 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +238 -0
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/schemas/index.d.cts +11 -11
- package/dist/schemas/index.d.ts +11 -11
- package/package.json +27 -26
- package/src/__tests__/__snapshots__/cvc-sot.snap +4 -0
- package/src/__tests__/cvc-drift-gate.test.ts +18 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +8 -0
- package/src/__tests__/cvc-structural.test.ts +2 -0
- package/src/__tests__/share-response-reason-invariant.test.ts +167 -0
- package/src/cvcs/index.ts +4 -0
- package/src/cvcs/shareResponseReason.v1.0.0.json +220 -0
- package/src/generated/cvc-enums.ts +22 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domain": "share_response_reason",
|
|
3
|
+
"name": "Core Share Response Reason",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"_status": "CANONICAL — 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` · `decline_share` · `reject_share`) carried per entry as `contexts` — 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 — 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` — 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 — 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.",
|
|
6
|
+
"_source": "htilabstech/prototype/data/cvcs/core_share_response_reason.yaml @ 6c2cfc0a + htilabstech/prototype/Final CVCs/Sharing (IC-65)/core - share_response_reason — codebook.csv @ 6c2cfc0a (Notion CVC-306 v1.1; read from origin/main)",
|
|
7
|
+
"contexts": {
|
|
8
|
+
"field_review": "Field review",
|
|
9
|
+
"decline_share": "Decline share",
|
|
10
|
+
"reject_share": "Reject share"
|
|
11
|
+
},
|
|
12
|
+
"levels": {
|
|
13
|
+
"0": "Unknown or Missing",
|
|
14
|
+
"1": "Share response reason"
|
|
15
|
+
},
|
|
16
|
+
"entries": [
|
|
17
|
+
{
|
|
18
|
+
"code": "306-000-000-000-000-000-000",
|
|
19
|
+
"key": "missingness_root",
|
|
20
|
+
"title": "Unknown, Redacted, or Missing",
|
|
21
|
+
"selectable": false,
|
|
22
|
+
"parentCode": null,
|
|
23
|
+
"childCodes": [
|
|
24
|
+
"306-000-000-000-000-000-001"
|
|
25
|
+
],
|
|
26
|
+
"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."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"code": "306-000-000-000-000-000-001",
|
|
30
|
+
"key": "unknown",
|
|
31
|
+
"title": "Unknown",
|
|
32
|
+
"selectable": false,
|
|
33
|
+
"parentCode": "306-000-000-000-000-000-000",
|
|
34
|
+
"childCodes": [],
|
|
35
|
+
"definition": "Unknown or cannot be determined from the available information.",
|
|
36
|
+
"canonicalCode": "UNK",
|
|
37
|
+
"contexts": [],
|
|
38
|
+
"guidance": null,
|
|
39
|
+
"logicNotes": "House missingness convention (L0) — 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).",
|
|
40
|
+
"tobyRetention": {
|
|
41
|
+
"class": "tombstone_retain",
|
|
42
|
+
"stewardFlag": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"code": "306-001-000-000-000-000-000",
|
|
47
|
+
"key": "information_incorrect",
|
|
48
|
+
"title": "The information is incorrect",
|
|
49
|
+
"selectable": true,
|
|
50
|
+
"parentCode": null,
|
|
51
|
+
"childCodes": [],
|
|
52
|
+
"definition": "The value is wrong — it does not match reality as the recipient knows it.",
|
|
53
|
+
"contexts": [
|
|
54
|
+
"field_review"
|
|
55
|
+
],
|
|
56
|
+
"guidance": "The highest-signal code for platform accuracy learning: an explicit human judgment that the sender's record is wrong on this point.",
|
|
57
|
+
"logicNotes": "Sibling of core - record_removal_reason's created_in_error / value-incorrect family.",
|
|
58
|
+
"tobyRetention": {
|
|
59
|
+
"class": "supersede"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"code": "306-002-000-000-000-000-000",
|
|
64
|
+
"key": "not_relevant_for_client",
|
|
65
|
+
"title": "Not relevant for my client",
|
|
66
|
+
"selectable": true,
|
|
67
|
+
"parentCode": null,
|
|
68
|
+
"childCodes": [],
|
|
69
|
+
"definition": "The information may be true, but it doesn't belong in this client's record for the services this agency provides.",
|
|
70
|
+
"contexts": [
|
|
71
|
+
"field_review"
|
|
72
|
+
],
|
|
73
|
+
"guidance": "Deliberately distinct from information_incorrect — relevance and accuracy must never collapse into one code (the RemoveAssetFlow lesson).",
|
|
74
|
+
"logicNotes": null,
|
|
75
|
+
"tobyRetention": {
|
|
76
|
+
"class": "tombstone_retain"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"code": "306-003-000-000-000-000-000",
|
|
81
|
+
"key": "duplicate_already_have",
|
|
82
|
+
"title": "Duplicate of what we have",
|
|
83
|
+
"selectable": true,
|
|
84
|
+
"parentCode": null,
|
|
85
|
+
"childCodes": [],
|
|
86
|
+
"definition": "The recipient already holds this information (or this whole share duplicates one already received).",
|
|
87
|
+
"contexts": [
|
|
88
|
+
"field_review",
|
|
89
|
+
"decline_share"
|
|
90
|
+
],
|
|
91
|
+
"guidance": "Field review: the incoming value adds nothing. Decline: the share as a whole duplicates a prior one.",
|
|
92
|
+
"logicNotes": null,
|
|
93
|
+
"tobyRetention": {
|
|
94
|
+
"class": "tombstone_retain",
|
|
95
|
+
"engineSignal": "same_thing"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"code": "306-004-000-000-000-000-000",
|
|
100
|
+
"key": "client_declined_recording",
|
|
101
|
+
"title": "Client asked us not to record this",
|
|
102
|
+
"selectable": true,
|
|
103
|
+
"parentCode": null,
|
|
104
|
+
"childCodes": [],
|
|
105
|
+
"definition": "The client asked this agency not to hold this information on file.",
|
|
106
|
+
"contexts": [
|
|
107
|
+
"field_review"
|
|
108
|
+
],
|
|
109
|
+
"guidance": "A consent judgment, not an accuracy judgment — platform learning must never read this as evidence the value is wrong.",
|
|
110
|
+
"logicNotes": "Interacts with the subpoena-exposure balancing test (GDR § 5.61): the advocate is weighing legal-harm risk against service value.",
|
|
111
|
+
"tobyRetention": {
|
|
112
|
+
"class": "inclusion_register"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"code": "306-005-000-000-000-000-000",
|
|
117
|
+
"key": "wrong_agency_service_area",
|
|
118
|
+
"title": "Wrong agency / outside our service area",
|
|
119
|
+
"selectable": true,
|
|
120
|
+
"parentCode": null,
|
|
121
|
+
"childCodes": [],
|
|
122
|
+
"definition": "This share should not have come to this agency — wrong coverage area or wrong service type.",
|
|
123
|
+
"contexts": [
|
|
124
|
+
"decline_share"
|
|
125
|
+
],
|
|
126
|
+
"guidance": "Decline-only: a routing miss, decided before engaging the content.",
|
|
127
|
+
"logicNotes": null,
|
|
128
|
+
"tobyRetention": {
|
|
129
|
+
"class": "retain_event"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"code": "306-006-000-000-000-000-000",
|
|
134
|
+
"key": "not_our_client",
|
|
135
|
+
"title": "Not our client",
|
|
136
|
+
"selectable": true,
|
|
137
|
+
"parentCode": null,
|
|
138
|
+
"childCodes": [],
|
|
139
|
+
"definition": "This person is not (and will not become) a client of this agency.",
|
|
140
|
+
"contexts": [
|
|
141
|
+
"decline_share"
|
|
142
|
+
],
|
|
143
|
+
"guidance": "Decline-only. NOT for the turned-away scenario — if the person was actually reached and chose no services, that's an ACCEPT with offered services + why-nots recorded.",
|
|
144
|
+
"logicNotes": null,
|
|
145
|
+
"tobyRetention": {
|
|
146
|
+
"class": "retain_event"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"code": "306-007-000-000-000-000-000",
|
|
151
|
+
"key": "sent_in_error",
|
|
152
|
+
"title": "Sent in error",
|
|
153
|
+
"selectable": true,
|
|
154
|
+
"parentCode": null,
|
|
155
|
+
"childCodes": [],
|
|
156
|
+
"definition": "The sender shared this by mistake (confirmed with the sender or evident from the content).",
|
|
157
|
+
"contexts": [
|
|
158
|
+
"decline_share",
|
|
159
|
+
"reject_share"
|
|
160
|
+
],
|
|
161
|
+
"guidance": "Available at decline (before engaging) and reject (discovered during review).",
|
|
162
|
+
"logicNotes": null,
|
|
163
|
+
"tobyRetention": {
|
|
164
|
+
"class": "retain_event"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"code": "306-008-000-000-000-000-000",
|
|
169
|
+
"key": "no_capacity",
|
|
170
|
+
"title": "No capacity right now",
|
|
171
|
+
"selectable": true,
|
|
172
|
+
"parentCode": null,
|
|
173
|
+
"childCodes": [],
|
|
174
|
+
"definition": "The agency cannot take this on at the moment.",
|
|
175
|
+
"contexts": [
|
|
176
|
+
"decline_share"
|
|
177
|
+
],
|
|
178
|
+
"guidance": "Decline-only; honest operational reason — the sender can re-share later (a re-claim starts fresh).",
|
|
179
|
+
"logicNotes": null,
|
|
180
|
+
"tobyRetention": {
|
|
181
|
+
"class": "retain_event"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"code": "306-009-000-000-000-000-000",
|
|
186
|
+
"key": "cannot_verify_conflicts",
|
|
187
|
+
"title": "Can't verify — conflicts with the client's account",
|
|
188
|
+
"selectable": true,
|
|
189
|
+
"parentCode": null,
|
|
190
|
+
"childCodes": [],
|
|
191
|
+
"definition": "The delivered content conflicts with what the client has told this agency directly, and cannot be verified.",
|
|
192
|
+
"contexts": [
|
|
193
|
+
"reject_share"
|
|
194
|
+
],
|
|
195
|
+
"guidance": "Reject-only: a whole-share trust judgment after review. High-signal for deconfliction/accuracy learning.",
|
|
196
|
+
"logicNotes": null,
|
|
197
|
+
"tobyRetention": {
|
|
198
|
+
"class": "retain_event"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"code": "306-010-000-000-000-000-000",
|
|
203
|
+
"key": "wrong_person",
|
|
204
|
+
"title": "Wrong person",
|
|
205
|
+
"selectable": true,
|
|
206
|
+
"parentCode": null,
|
|
207
|
+
"childCodes": [],
|
|
208
|
+
"definition": "Review made clear the shared content is about a different person than the recipient's client.",
|
|
209
|
+
"contexts": [
|
|
210
|
+
"reject_share"
|
|
211
|
+
],
|
|
212
|
+
"guidance": "Reject-only. Case identity, never person identity: the fix is rejecting the share — no cross-agency person merge exists or ever will.",
|
|
213
|
+
"logicNotes": null,
|
|
214
|
+
"tobyRetention": {
|
|
215
|
+
"class": "retain_event",
|
|
216
|
+
"engineSignal": "cross_agency_wrongness"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
@@ -922,6 +922,28 @@ export const CaseShareStateKeys = {
|
|
|
922
922
|
|
|
923
923
|
export type CaseShareStateKey = keyof typeof CaseShareStateKeys;
|
|
924
924
|
|
|
925
|
+
/**
|
|
926
|
+
* Key → positional code map for the `share_response_reason` CVC domain (CVC-306, canonical v1.1 `Active` after the 2026-09-14 SHARING-FAMILY-AUDIT; generated from prototype origin/main canon by scripts/gen-share-response-reason.py). The structured reasons a recipient gives when responding to an inbound case share. ONE codebook with per-CONTEXT selectability carried per entry as `contexts` (`field_review` · `decline_share` · `reject_share`) — build a context's picker by filtering on `contexts`, not on this key map. The single L0 sentinel (`unknown`, canonical UNK) is ingestion-only and never a picker chip; the codebook's archived DNC row is omitted.
|
|
927
|
+
*
|
|
928
|
+
* Domain: `share_response_reason` · Version: 1.0.0 · Entries: 12
|
|
929
|
+
*/
|
|
930
|
+
export const ShareResponseReasonKeys = {
|
|
931
|
+
missingness_root: "306-000-000-000-000-000-000",
|
|
932
|
+
unknown: "306-000-000-000-000-000-001",
|
|
933
|
+
information_incorrect: "306-001-000-000-000-000-000",
|
|
934
|
+
not_relevant_for_client: "306-002-000-000-000-000-000",
|
|
935
|
+
duplicate_already_have: "306-003-000-000-000-000-000",
|
|
936
|
+
client_declined_recording: "306-004-000-000-000-000-000",
|
|
937
|
+
wrong_agency_service_area: "306-005-000-000-000-000-000",
|
|
938
|
+
not_our_client: "306-006-000-000-000-000-000",
|
|
939
|
+
sent_in_error: "306-007-000-000-000-000-000",
|
|
940
|
+
no_capacity: "306-008-000-000-000-000-000",
|
|
941
|
+
cannot_verify_conflicts: "306-009-000-000-000-000-000",
|
|
942
|
+
wrong_person: "306-010-000-000-000-000-000",
|
|
943
|
+
} as const;
|
|
944
|
+
|
|
945
|
+
export type ShareResponseReasonKey = keyof typeof ShareResponseReasonKeys;
|
|
946
|
+
|
|
925
947
|
/**
|
|
926
948
|
* Key → positional code map for the `facilitator_entity_type` CVC domain.
|
|
927
949
|
*
|