@htilabs/platform-common-models 0.61.0 → 0.62.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.
- package/README.md +9 -0
- package/dist/authz/index.cjs +104 -0
- package/dist/authz/index.cjs.map +1 -1
- package/dist/authz/index.d.cts +21 -1
- package/dist/authz/index.d.ts +21 -1
- package/dist/authz/index.js +101 -0
- package/dist/authz/index.js.map +1 -1
- package/dist/{index-DvAypMJV.d.ts → index-Bh1zO_Vu.d.ts} +1 -1
- package/dist/{index-Bj-s0nZy.d.cts → index-XWSYon40.d.cts} +1 -1
- package/dist/index.cjs +104 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +101 -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 +25 -25
- package/dist/schemas/index.d.ts +25 -25
- package/package.json +1 -1
- package/src/__tests__/authz-resolve.test.ts +3 -0
- package/src/__tests__/core-function-notes.test.ts +35 -0
- package/src/authz/functionNotes.ts +20 -0
- package/src/authz/index.ts +1 -0
- package/src/generated/coreFunctionNotes.ts +107 -0
- package/dist/{cvcEntry-BLeRivoF.d.cts → cvcEntry-D787utvP.d.cts} +8 -8
- package/dist/{cvcEntry-BLeRivoF.d.ts → cvcEntry-D787utvP.d.ts} +8 -8
package/dist/models/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as CvcEntry, b as CvcRegistry, F as Form, P as PlatformFunction, d as PlatformRole, Q as Question, f as ScoringRule, h as Section } from '../cvcEntry-
|
|
1
|
+
export { a as CvcEntry, b as CvcRegistry, F as Form, P as PlatformFunction, d as PlatformRole, Q as Question, f as ScoringRule, h as Section } from '../cvcEntry-D787utvP.cjs';
|
|
2
2
|
import 'mongoose';
|
|
3
|
-
export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from '../index-
|
|
3
|
+
export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from '../index-XWSYon40.cjs';
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as CvcEntry, b as CvcRegistry, F as Form, P as PlatformFunction, d as PlatformRole, Q as Question, f as ScoringRule, h as Section } from '../cvcEntry-
|
|
1
|
+
export { a as CvcEntry, b as CvcRegistry, F as Form, P as PlatformFunction, d as PlatformRole, Q as Question, f as ScoringRule, h as Section } from '../cvcEntry-D787utvP.js';
|
|
2
2
|
import 'mongoose';
|
|
3
|
-
export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from '../index-
|
|
3
|
+
export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from '../index-Bh1zO_Vu.js';
|
package/dist/schemas/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
2
|
import { InferRawDocType, Schema } from 'mongoose';
|
|
3
|
-
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-
|
|
3
|
+
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-D787utvP.cjs';
|
|
4
4
|
import { a as AddAgencyOrgTypeFieldsOptions } from '../agency-BXvE4yWu.cjs';
|
|
5
5
|
export { A as AGENCY_ORG_TYPE_VALIDATED_UPDATE_OPS, b as AgencyOrgTypeFields, O as ORG_TYPE_FIELD_NAMES, c as OrgTypeFieldName, d as OrgTypeFields, e as OrgTypeFieldsHolder, V as VSP_TWO_STEP_ISSUE, f as addAgencyOrgTypeFields, g as addOrgTypeFields, h as agencyOrgTypeSchemaDefinition, i as applyRunValidatorsIfUnset, j as installVspTwoStepHooks, m as mirrorOrgTypeFields, o as orgTypeFieldsDiffer, k as orgTypeSchemaDefinition, r as resolveEffectiveOrgType, l as resolveEffectiveOrgTypeFields, v as vspTwoStepHolds, n as vspTwoStepHoldsOnUpdate } from '../agency-BXvE4yWu.cjs';
|
|
6
6
|
export { P as PROGRAM_REVIEW_STATUS, a as PROGRAM_REVIEW_STATUS_VALUES, b as ProgramReviewStatus, i as isLiveOrganizationProgram, c as isProgramReviewStatus } from '../vocabulary-Cxhi9EGt.cjs';
|
|
@@ -137,12 +137,12 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
137
137
|
number?: string | null | undefined;
|
|
138
138
|
type?: string | null | undefined;
|
|
139
139
|
safeToContact?: boolean | null | undefined;
|
|
140
|
-
dataQuality?: "
|
|
140
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
141
141
|
}, mongoose.Document<unknown, {}, {
|
|
142
142
|
number?: string | null | undefined;
|
|
143
143
|
type?: string | null | undefined;
|
|
144
144
|
safeToContact?: boolean | null | undefined;
|
|
145
|
-
dataQuality?: "
|
|
145
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
id: string;
|
|
148
148
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
@@ -151,7 +151,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
151
151
|
number?: string | null | undefined;
|
|
152
152
|
type?: string | null | undefined;
|
|
153
153
|
safeToContact?: boolean | null | undefined;
|
|
154
|
-
dataQuality?: "
|
|
154
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
155
155
|
} & {
|
|
156
156
|
_id: mongoose.Types.ObjectId;
|
|
157
157
|
} & {
|
|
@@ -162,7 +162,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
162
162
|
number?: string | null | undefined;
|
|
163
163
|
type?: string | null | undefined;
|
|
164
164
|
safeToContact?: boolean | null | undefined;
|
|
165
|
-
dataQuality?: "
|
|
165
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
166
166
|
} & {
|
|
167
167
|
_id: mongoose.Types.ObjectId;
|
|
168
168
|
} & {
|
|
@@ -224,11 +224,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
224
224
|
raceOtherText?: string | null | undefined;
|
|
225
225
|
genderOtherText?: string | null | undefined;
|
|
226
226
|
accommodationOtherText?: string | null | undefined;
|
|
227
|
-
ageDataQuality?: "
|
|
228
|
-
sexDataQuality?: "
|
|
229
|
-
genderDataQuality?: "
|
|
230
|
-
raceDataQuality?: "
|
|
231
|
-
ethnicityDataQuality?: "
|
|
227
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
228
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
229
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
230
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
231
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
232
232
|
}, mongoose.Document<unknown, {}, {
|
|
233
233
|
race: number[];
|
|
234
234
|
ethnicity: number[];
|
|
@@ -248,11 +248,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
248
248
|
raceOtherText?: string | null | undefined;
|
|
249
249
|
genderOtherText?: string | null | undefined;
|
|
250
250
|
accommodationOtherText?: string | null | undefined;
|
|
251
|
-
ageDataQuality?: "
|
|
252
|
-
sexDataQuality?: "
|
|
253
|
-
genderDataQuality?: "
|
|
254
|
-
raceDataQuality?: "
|
|
255
|
-
ethnicityDataQuality?: "
|
|
251
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
252
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
253
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
254
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
255
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
256
256
|
}, {
|
|
257
257
|
id: string;
|
|
258
258
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
@@ -276,11 +276,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
276
276
|
raceOtherText?: string | null | undefined;
|
|
277
277
|
genderOtherText?: string | null | undefined;
|
|
278
278
|
accommodationOtherText?: string | null | undefined;
|
|
279
|
-
ageDataQuality?: "
|
|
280
|
-
sexDataQuality?: "
|
|
281
|
-
genderDataQuality?: "
|
|
282
|
-
raceDataQuality?: "
|
|
283
|
-
ethnicityDataQuality?: "
|
|
279
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
280
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
281
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
282
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
283
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
284
284
|
} & {
|
|
285
285
|
_id: mongoose.Types.ObjectId;
|
|
286
286
|
} & {
|
|
@@ -306,11 +306,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
306
306
|
raceOtherText?: string | null | undefined;
|
|
307
307
|
genderOtherText?: string | null | undefined;
|
|
308
308
|
accommodationOtherText?: string | null | undefined;
|
|
309
|
-
ageDataQuality?: "
|
|
310
|
-
sexDataQuality?: "
|
|
311
|
-
genderDataQuality?: "
|
|
312
|
-
raceDataQuality?: "
|
|
313
|
-
ethnicityDataQuality?: "
|
|
309
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
310
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
311
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
312
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
313
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
314
314
|
} & {
|
|
315
315
|
_id: mongoose.Types.ObjectId;
|
|
316
316
|
} & {
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
2
|
import { InferRawDocType, Schema } from 'mongoose';
|
|
3
|
-
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-
|
|
3
|
+
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-D787utvP.js';
|
|
4
4
|
import { a as AddAgencyOrgTypeFieldsOptions } from '../agency-NEW6NOGD.js';
|
|
5
5
|
export { A as AGENCY_ORG_TYPE_VALIDATED_UPDATE_OPS, b as AgencyOrgTypeFields, O as ORG_TYPE_FIELD_NAMES, c as OrgTypeFieldName, d as OrgTypeFields, e as OrgTypeFieldsHolder, V as VSP_TWO_STEP_ISSUE, f as addAgencyOrgTypeFields, g as addOrgTypeFields, h as agencyOrgTypeSchemaDefinition, i as applyRunValidatorsIfUnset, j as installVspTwoStepHooks, m as mirrorOrgTypeFields, o as orgTypeFieldsDiffer, k as orgTypeSchemaDefinition, r as resolveEffectiveOrgType, l as resolveEffectiveOrgTypeFields, v as vspTwoStepHolds, n as vspTwoStepHoldsOnUpdate } from '../agency-NEW6NOGD.js';
|
|
6
6
|
export { P as PROGRAM_REVIEW_STATUS, a as PROGRAM_REVIEW_STATUS_VALUES, b as ProgramReviewStatus, i as isLiveOrganizationProgram, c as isProgramReviewStatus } from '../vocabulary-Cxhi9EGt.js';
|
|
@@ -137,12 +137,12 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
137
137
|
number?: string | null | undefined;
|
|
138
138
|
type?: string | null | undefined;
|
|
139
139
|
safeToContact?: boolean | null | undefined;
|
|
140
|
-
dataQuality?: "
|
|
140
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
141
141
|
}, mongoose.Document<unknown, {}, {
|
|
142
142
|
number?: string | null | undefined;
|
|
143
143
|
type?: string | null | undefined;
|
|
144
144
|
safeToContact?: boolean | null | undefined;
|
|
145
|
-
dataQuality?: "
|
|
145
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
id: string;
|
|
148
148
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
@@ -151,7 +151,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
151
151
|
number?: string | null | undefined;
|
|
152
152
|
type?: string | null | undefined;
|
|
153
153
|
safeToContact?: boolean | null | undefined;
|
|
154
|
-
dataQuality?: "
|
|
154
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
155
155
|
} & {
|
|
156
156
|
_id: mongoose.Types.ObjectId;
|
|
157
157
|
} & {
|
|
@@ -162,7 +162,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
162
162
|
number?: string | null | undefined;
|
|
163
163
|
type?: string | null | undefined;
|
|
164
164
|
safeToContact?: boolean | null | undefined;
|
|
165
|
-
dataQuality?: "
|
|
165
|
+
dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
166
166
|
} & {
|
|
167
167
|
_id: mongoose.Types.ObjectId;
|
|
168
168
|
} & {
|
|
@@ -224,11 +224,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
224
224
|
raceOtherText?: string | null | undefined;
|
|
225
225
|
genderOtherText?: string | null | undefined;
|
|
226
226
|
accommodationOtherText?: string | null | undefined;
|
|
227
|
-
ageDataQuality?: "
|
|
228
|
-
sexDataQuality?: "
|
|
229
|
-
genderDataQuality?: "
|
|
230
|
-
raceDataQuality?: "
|
|
231
|
-
ethnicityDataQuality?: "
|
|
227
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
228
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
229
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
230
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
231
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
232
232
|
}, mongoose.Document<unknown, {}, {
|
|
233
233
|
race: number[];
|
|
234
234
|
ethnicity: number[];
|
|
@@ -248,11 +248,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
248
248
|
raceOtherText?: string | null | undefined;
|
|
249
249
|
genderOtherText?: string | null | undefined;
|
|
250
250
|
accommodationOtherText?: string | null | undefined;
|
|
251
|
-
ageDataQuality?: "
|
|
252
|
-
sexDataQuality?: "
|
|
253
|
-
genderDataQuality?: "
|
|
254
|
-
raceDataQuality?: "
|
|
255
|
-
ethnicityDataQuality?: "
|
|
251
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
252
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
253
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
254
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
255
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
256
256
|
}, {
|
|
257
257
|
id: string;
|
|
258
258
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
@@ -276,11 +276,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
276
276
|
raceOtherText?: string | null | undefined;
|
|
277
277
|
genderOtherText?: string | null | undefined;
|
|
278
278
|
accommodationOtherText?: string | null | undefined;
|
|
279
|
-
ageDataQuality?: "
|
|
280
|
-
sexDataQuality?: "
|
|
281
|
-
genderDataQuality?: "
|
|
282
|
-
raceDataQuality?: "
|
|
283
|
-
ethnicityDataQuality?: "
|
|
279
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
280
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
281
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
282
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
283
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
284
284
|
} & {
|
|
285
285
|
_id: mongoose.Types.ObjectId;
|
|
286
286
|
} & {
|
|
@@ -306,11 +306,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
306
306
|
raceOtherText?: string | null | undefined;
|
|
307
307
|
genderOtherText?: string | null | undefined;
|
|
308
308
|
accommodationOtherText?: string | null | undefined;
|
|
309
|
-
ageDataQuality?: "
|
|
310
|
-
sexDataQuality?: "
|
|
311
|
-
genderDataQuality?: "
|
|
312
|
-
raceDataQuality?: "
|
|
313
|
-
ethnicityDataQuality?: "
|
|
309
|
+
ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
310
|
+
sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
311
|
+
genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
312
|
+
raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
313
|
+
ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
|
|
314
314
|
} & {
|
|
315
315
|
_id: mongoose.Types.ObjectId;
|
|
316
316
|
} & {
|
package/package.json
CHANGED
|
@@ -549,6 +549,9 @@ describe("§ 4.1 extras", () => {
|
|
|
549
549
|
"../services/informationScopeResolver.js",
|
|
550
550
|
"./viewingPolicy.js",
|
|
551
551
|
"./viewingScope.js",
|
|
552
|
+
// CVC-133 Guidance and Logic notes (0.62.0): generated, read-only vocabulary.
|
|
553
|
+
"./functionNotes.js",
|
|
554
|
+
"../generated/coreFunctionNotes.js",
|
|
552
555
|
]),
|
|
553
556
|
);
|
|
554
557
|
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CORE FUNCTIONS (CVC-133) — the Guidance and Logic notes module
|
|
3
|
+
* ===============================================================
|
|
4
|
+
*
|
|
5
|
+
* `src/generated/coreFunctionNotes.ts` is GENERATED from canon's `guidance` / `logic_notes` columns by
|
|
6
|
+
* `scripts/gen-core-functions.py`; `gen-core-functions.py --check` is the detector for canon moving. This test
|
|
7
|
+
* holds the shape: exactly the evaluable keys, verbatim strings or null, and the accessor.
|
|
8
|
+
*/
|
|
9
|
+
import { describe, it, expect } from "vitest";
|
|
10
|
+
|
|
11
|
+
import { CORE_FUNCTION_NOTES, CORE_FUNCTION_NOTES_SOT_VERSION, coreFunctionNotes } from "../authz/index.js";
|
|
12
|
+
import {
|
|
13
|
+
CORE_FUNCTIONS_EVALUABLE_KEYS,
|
|
14
|
+
CORE_FUNCTIONS_EVALUABLE_SOT_VERSION,
|
|
15
|
+
} from "../generated/coreFunctionsEvaluable.js";
|
|
16
|
+
|
|
17
|
+
describe("CORE_FUNCTION_NOTES", () => {
|
|
18
|
+
it("covers exactly the evaluable functions, at the same SOT version", () => {
|
|
19
|
+
const keys = Object.keys(CORE_FUNCTION_NOTES).sort();
|
|
20
|
+
expect(keys).toEqual([...CORE_FUNCTIONS_EVALUABLE_KEYS].sort());
|
|
21
|
+
expect(CORE_FUNCTION_NOTES_SOT_VERSION).toBe(CORE_FUNCTIONS_EVALUABLE_SOT_VERSION);
|
|
22
|
+
});
|
|
23
|
+
it("carries a non-empty string or null in each column", () => {
|
|
24
|
+
for (const n of Object.values(CORE_FUNCTION_NOTES)) {
|
|
25
|
+
for (const v of [n.guidance, n.logicNotes]) expect(v === null || (typeof v === "string" && v.trim() === v && v.length > 0)).toBe(true);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
it("reads canon verbatim (case_edit) and answers null off the evaluable set", () => {
|
|
29
|
+
expect(coreFunctionNotes("case_edit")?.guidance).toBe(
|
|
30
|
+
"Use for standard case updates in PAVE (notes, attributes, metadata). Do not use for referral sending/receiving, ROI workflows, or governance configuration.",
|
|
31
|
+
);
|
|
32
|
+
expect(coreFunctionNotes("case_edit")?.logicNotes).toMatch(/^Edits should respect field-level permissions and workflow state\./);
|
|
33
|
+
expect(coreFunctionNotes("not_a_function")).toBeNull();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @htilabs/platform-common-models — CVC-133 Guidance and Logic notes (read-only)
|
|
3
|
+
*
|
|
4
|
+
* The codebook's two reading columns per evaluable function — Guidance and Logic notes (canon
|
|
5
|
+
* `guidance` / `logic_notes` in the records repo's `data/cvcs/core_functions.yaml`) — generated into
|
|
6
|
+
* `CORE_FUNCTION_NOTES` by `scripts/gen-core-functions.py`, verbatim. What Platform Configuration's
|
|
7
|
+
* function window shows under the definition ("Guidance:" · "How it behaves:", platform-prototype
|
|
8
|
+
* `function PBFunctionConfigModal(`). Vocabulary, never policy: nothing here grants or refuses.
|
|
9
|
+
*/
|
|
10
|
+
import { CORE_FUNCTION_NOTES } from "../generated/coreFunctionNotes.js";
|
|
11
|
+
import type { CoreFunctionNotes } from "../generated/coreFunctionNotes.js";
|
|
12
|
+
|
|
13
|
+
export { CORE_FUNCTION_NOTES, CORE_FUNCTION_NOTES_SOT_VERSION } from "../generated/coreFunctionNotes.js";
|
|
14
|
+
export type { CoreFunctionNotes } from "../generated/coreFunctionNotes.js";
|
|
15
|
+
|
|
16
|
+
/** One function's notes, or null for a key the codebook does not carry as evaluable. */
|
|
17
|
+
export function coreFunctionNotes(functionCode: string): CoreFunctionNotes | null {
|
|
18
|
+
if (!Object.hasOwn(CORE_FUNCTION_NOTES, functionCode)) return null;
|
|
19
|
+
return CORE_FUNCTION_NOTES[functionCode];
|
|
20
|
+
}
|
package/src/authz/index.ts
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @htilabs/platform-common-models — CVC-133 Guidance and Logic notes
|
|
3
|
+
*
|
|
4
|
+
* AUTO-GENERATED FILE — DO NOT EDIT BY HAND.
|
|
5
|
+
* Regenerate with: `python3 scripts/gen-core-functions.py <prototype root>`.
|
|
6
|
+
*
|
|
7
|
+
* For each evaluable function of coreFunctions.v1.5.0.json (canon @ d63c2a42): the codebook's
|
|
8
|
+
* Guidance and Logic notes columns (canon `guidance` / `logic_notes`), verbatim; a blank cell is null.
|
|
9
|
+
* Read-only vocabulary — the reading Platform Configuration's function window shows.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export const CORE_FUNCTION_NOTES_SOT_VERSION = "1.5.0";
|
|
13
|
+
|
|
14
|
+
export interface CoreFunctionNotes {
|
|
15
|
+
readonly guidance: string | null;
|
|
16
|
+
readonly logicNotes: string | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const CORE_FUNCTION_NOTES: Readonly<Record<string, CoreFunctionNotes>> = {
|
|
20
|
+
"agency_info_manage": { guidance: null, logicNotes: "Seeded 2026-08-13. As-built canDirectEdit (agencyhub.jsx) passes ANY admin role at the own agency plus PLT-ADM/PLT-SUP; these bounds are the deliberate Phase-2 narrowing. The code's own header called the missing function a standing steward flag — this row closes it. | CLOSED 2026-08-14 (CORE-FUNCTIONS Phase 2, ruling R-B): canDirectEdit narrowed — same-agency seats must resolve agency_info_manage ∨ srl_manage; the PLT steward arm is unchanged. [CVC133-AUDIT 2026-09-10]" },
|
|
21
|
+
"announcement_publish": { guidance: null, logicNotes: "Seeded 2026-08-13. As-built gates diverge: platform isHTIStaff (PLT-ADM/PLT-SUP) vs leads-app canPublishAnnouncements (internal_hti org membership). These bounds are the convergence target; Phase 2 re-points the leads-app gate. | CLOSED 2026-08-14 (Phase 2): leads-app canPublishAnnouncements converges on these bounds — the internal_hti org blanket is retired and the armed governance stand-in stays as the explicit demo arm; the /settings card renders disabled-with-reason. [CVC133-AUDIT 2026-09-10]" },
|
|
22
|
+
"api_key_manage": { guidance: "Use for integration credential management and security hygiene.", logicNotes: "High-risk control-plane action. Always audited. Often restricted to MEM-ADM/PLT-ADM." },
|
|
23
|
+
"assessments_conduct": { guidance: "Use for the action of conducting an assessment, including answering and submitting the instrument. Distinct from viewing assessment responses. Screenings (including the Lethality Assessment and Injury & Strangulation Screening) follow screening_conduct; the Needs Assessment and the Adult Hope Scale follow needs_priorities_conduct.", logicNotes: "May require specific training/certification and may be limited by workflow state. Responses should be immutable after submission except via governed correction pathways. Ensure timestamping, author attribution, and linkage to the relevant case/session. | Re-scoped 2026-08-13 (Phase-0 overhaul): PAVE → PAVE/LEADS — the TRA is the LEADS instrument (per-answer CARs, freeze-on-submit; 'IDA' is the same flow's labor question set, not a separate runner). | Investigator + Intelligence Analyst added to Always 2026-10-01 (CAPTURE-AUTHZ-BOUNDS-GAPS — Crysta: 'those are gaps that need fixed'): the TRA is their instrument and the row bound neither, so both were refused it once the function was enforced. Level is the agent's derivation: Always, matching their binding on determination_perform — move it if she wants Default On. | ENFORCED 2026-10-01 (CAPTURE-AUTHZ-WAVE4): HTI_CAPTURE_AUTHZ.guard at the opener, the runner's open and its commit; regression net tools/smoke/flows/capture-authz-wave4.js. Which instruments this code governs (Crysta 2026-10-01): IDA, Stalking Assessment, Danger Assessment, TRA. The Lethality Assessment (LAP) and Injury & Strangulation Screening are 'specialized screens' and follow screening_conduct, though PAVE lists them with the assessments on the Exploitation page. The Needs Assessment and the Adult Hope Scale follow needs_priorities_conduct. Definition and Guidance reworded 2026-10-01 to say so (Crysta: 'Please address / reword')." },
|
|
24
|
+
"auth_model_manage_platform": { guidance: "HTI Labs control-plane function. Enables platform-level definition of roles/functions and enforcement logic. Should not imply routine case content access.", logicNotes: "Changes must be auditable, versioned, and reviewed. Separate from member-level role assignment (MEM-ADM)." },
|
|
25
|
+
"case_assign_reassign": { guidance: "Use for administrative case assignment and reassignment workflows (turnover, load balancing, supervisory action). Must honor viewing/sharing policy clamps; assignment should not automatically grant broader visibility beyond what policies allow.", logicNotes: "Audit all assignment changes (who changed, when, from/to). Consider requiring reason codes for transfers. Distinct from operational collaboration actions (adding collaborators) if those exist." },
|
|
26
|
+
"case_claim": { guidance: "Use for recipient-side intake of referrals.", logicNotes: "Claiming should set ownership, start SLA timers where applicable, and apply recipient-side policy constraints. Must ensure the recipient has sufficient permissions and that any required training/certifications are satisfied. Log acceptance and claim events. | Renamed 2026-08-13 (was 'Claim Share'): distinct from Thread's hotline lifecycle status 'Claimed' (Open→Claimed→Submitted→Closed), which is a record state, not a function. | 2026-09-10 (CVC133-AUDIT, Crysta ruling R2): Case Navigator/Advocate was listed in both Always and Default On — Always stands (what the resolvers already computed); the Default On duplicate is removed." },
|
|
27
|
+
"case_close": { guidance: "Holder-only: the acting user must be the case's primary advocate or a co-primary (a second primary added by an accepted case collaboration). Bound like case_assign_reassign (Account Admin + Supervisor always; Case Advocate/Navigator always; Team Admin default on). The approval leg is the supervisor-confirm leg of case_status_manage brought to PAVE: the approver must hold this function AND be an Account Admin of the case's account or a supervisor of the holder, and is never the requester. Approval is always required in PAVE — no per-agency switch (unlike LEADS's supervisor_signoff_close).", logicNotes: "Minted 2026-10-10 on Crysta's 2026-10-09 ruling (CASE-OWNERSHIP-ON-SHARE + CLOSE-APPROVAL — Case Data Object page § 4 / § 4a): \"close should be holder-only (which means we need to add it to our core-functions CVC and give it the same authority as case_assign_reassign). I'd want a user to be able to do the close process, but it's not real until an admin or supervisor approves it (which would mean a notification that goes to the admin or supervisor and the ability for them to approve or not approve).\" Holder-only: the acting user must be the case's primary advocate or a co-primary (2026-10-09). The close is a REQUEST until an Account Admin or the holder's team Supervisor approves it (the supervisor-confirm leg of case_status_manage, brought to PAVE); the requester cannot approve their own request. Program exits taken on the way stand immediately (their own confirmed acts); only the relationship close waits. The derived CASE_CLOSED milestone dates to the ruling. Notifications: caseCloseRequested (to the approvers) · caseCloseRuled (back to the requester), CVC-284. Enforced in the monolith: the lifecycle popover's \"Mark engagement closed →\" door + HTI_LIFECYCLES_API.requestClose / ruleClose (records repo, KICKOFF_CASE_OWNERSHIP_ON_SHARE_AND_CLOSE_APPROVAL_2026-10-09.md WI-3/WI-4). Distinct from case_status_manage (LEADS-only, the investigative case's four facets) and from exit_discharge_conduct (the program-exit walk inside the same modal)." },
|
|
28
|
+
"case_collaborator_add": { guidance: "Use for collaboration membership changes on a case.", logicNotes: "Should enforce share purpose, counterparty rules, and viewing/sharing payload constraints where applicable. | Boundary note 2026-08-13: covers access-granting participant/collaborator adds (incl. co-claim). The Case Personnel panel's named-personnel entries are deliberately NON-access-granting and are not this function." },
|
|
29
|
+
"case_edit": { guidance: "Use for standard case updates in PAVE (notes, attributes, metadata). Do not use for referral sending/receiving, ROI workflows, or governance configuration.", logicNotes: "Edits should respect field-level permissions and workflow state. Record a full audit trail of changes. Enforce validation rules and required fields. Where applicable, restrict editing to assigned/claiming users or specific roles. | Narrowed + re-scoped 2026-08-13 (D13 split): PAVE → LEADS/PAVE/THREAD; six sibling capture codes carry the former scope; BLUF manual curation (blufCurationStore) rides HERE per the adversarial-review cut of a standalone bluf_curate." },
|
|
30
|
+
"case_needs_action_flag_manage": { guidance: "Supports admin/supervisor triage workflows described in the agency cases page concept. User ability to set vs clear can be governed separately via policy; default is that admins/supervisors can clear.", logicNotes: "Treat as workflow metadata; do not use as a substitute for legal/policy approvals. Audit flag changes." },
|
|
31
|
+
"case_reopen": { guidance: "Use when a user or system restores an inactive/closed case to an active state after new information, correction, or follow-up. Distinct from editing a closed case without changing status, duplicating/cloning a case, or creating a new case. Commonly used in PAVE when a prior screening/service record needs to resume.", logicNotes: "Re-open a closed case. This is a workflow state transition that must be:\n- authorized in context (role/team/purpose/legal basis/clearance/consent as applicable)\n- non-escalatory (does not expand visibility or sharing)\n- fully auditable (who/when/why)\n\nAny additional workflow effects (notifications, queue updates, timers) are implementation details and must not bypass authorization clamps." },
|
|
32
|
+
"case_side_panel_use": { guidance: "Use for the in-workflow action of adding collaboration notes and supplemental artifacts via the side panel UI. Useful for adding context to why and when information within a case changed.", logicNotes: "Notes and attachments may have separate retention and visibility rules. Attachments must flow through the safe pipeline (scanning/quarantine). Comments should be auditable where required and may be restricted to team scope. | Re-scoped 2026-08-13 (Phase-0 overhaul): LEADS → LEADS/PAVE/THREAD — PAVE/Thread Session Notes (HTI_NOTES_API) is the same capability. User bounds seeded (row previously carried only N/A: Research/Analytics)." },
|
|
33
|
+
"case_status_manage": { guidance: null, logicNotes: "Seeded 2026-08-13. Supervisor confirm is the approval leg of the same act (one code + note, D15/D19 pattern). Distinct from case_outcomes_edit (not v1): this transitions status; outcome-field content at closure is that row's scope. case_reopen remains its own row. | ENFORCED 2026-08-19 (CF-PHASE3-WAVE2): leads-app caseStore.ts caseActorMayGovern consults these bounds under the standing Case-Agent floor on every status transition and on the supervisor confirm leg (triageStore.ts too); walked FLOW-227. [CVC133-AUDIT 2026-09-10]" },
|
|
34
|
+
"case_transfer_bulk": { guidance: "Use for turnover management and emergency redistribution. Should be heavily audited and may be restricted to MEM-ADM by policy.", logicNotes: "Bulk actions should require confirmation, audit trail, and optionally dual-approval depending on member policy." },
|
|
35
|
+
"case_view": { guidance: "Use for read-only access to case records in PAVE. This is distinct from searching, editing, printing/exporting, or sharing.", logicNotes: "Enforce row-level access (team/agency, assignment/ownership, policy purpose). Viewing should be auditable (who accessed what, when). Redact fields that are not permitted (minimum necessary). | Re-scoped 2026-08-13 (Phase-0 overhaul): PAVE → PAVE/LEADS/THREAD — LEADS carries the richest as-built view gating (access.ts six-gate pipeline); Thread queues share the same factory. Bounds add: Always += Investigator, Intelligence Analyst; Default On += MDT Participant, Prosecutorial Reviewer, Legal Advocate." },
|
|
36
|
+
"case_visibility_manage": { guidance: null, logicNotes: "Seeded 2026-08-13 (Phase-0 overhaul). As-built also requires Case-Agent-or-admin standing on a participant agency (caseStore.ts canSetCaseVisibility) — a policy clamp layered above these role bounds. | ENFORCED 2026-08-19 (CF-PHASE3-WAVE2): leads-app caseStore.ts caseActorMayGovern on darken/restore, composed with the Case-Agent-or-admin participant-agency clamp. [CVC133-AUDIT 2026-09-10]" },
|
|
37
|
+
"ci_periodic_review": { guidance: "Use for the required periodic revalidation of active CI records (e.g., 28 CFR Part 23 review cycle), confirming continued relevance, accuracy, and compliance.", logicNotes: "Governance review workflow. Must enforce: (1) reviewer authorization + training, (2) evidence/reasonable suspicion basis still valid, (3) sourcing/provenance still sufficient, (4) disposition outcomes: revalidate, retire, purge-request, (5) set next review date, (6) full audit logging. This is not a content edit function; any substantive edits should be performed via the relevant record-edit function and then revalidated. | v1 2026-08-13 — BUILT (ciReviewQueue.ts + ciReviewsDue derivation); role enforcement lands Phase 2. | ENFORCED 2026-08-14 (Phase 2): outcome-grain store gate on revalidate (criminalIntelligence.ts ciActorMayGovern — CIRO bounds ∨ break-glass grant, refusal surfaced in CiReviewQueue); the any-admin stand-in arm was deleted 2026-08-19 once a real CIRO seat was seeded. [CVC133-AUDIT 2026-09-10]" },
|
|
38
|
+
"ci_record_purge_or_retire": { guidance: "Use for governance retirement/purge of CI records when they expire, fail revalidation, or must be destroyed under retention rules or legal requirement. Distinct from soft-delete/archiving and from non-CI case record purge.", logicNotes: "Approval-gated destructive action. Must enforce: (1) retention policy + legal hold checks, (2) jurisdiction/SOP constraints, (3) required justification, (4) irreversible purge semantics when purging, (5) audit logging and supervisory approval, (6) preserve non-identifying audit metadata required for compliance. Prefer \"retire\" when the record should become inactive but retained; use \"purge\" only when destruction is permitted/required. | v1 2026-08-13 — BUILT (removeCriminalIntelligenceFlag, note-required); role enforcement lands Phase 2. | ENFORCED 2026-08-14 (Phase 2): outcome-grain store gate on purge (criminalIntelligence.ts ciActorMayGovern — CIRO bounds ∨ break-glass grant); the any-admin stand-in arm was deleted 2026-08-19 once a real CIRO seat was seeded. [CVC133-AUDIT 2026-09-10]" },
|
|
39
|
+
"ci_record_validate": { guidance: "Use for designated-authority validation of an IDB (criminal intelligence) record so it can be treated as active CI for LEADS workflows. Distinct from creating/editing the record and from viewing CI.", logicNotes: "Approval-gated governance action. Must enforce: (1) required SOP/training prerequisite, (2) sourcing/provenance completeness, (3) classification + sensitivity tagging, (4) reasonable suspicion / 28 CFR Part 23 compliance where applicable, (5) audit logging (who/when/why), (6) set/refresh next required review date and retention timers. Validation must not expand who can view the record; visibility remains clamped by role + clearance + case/team context. | v1 2026-08-13 — BUILT (leads-app CI Review Queue, criminalIntelligence.ts reviewCriminalIntelligence); role enforcement lands Phase 2. | STATUS 2026-09-10 (CVC133-AUDIT): still config-only — no consumer resolves this code; the Review Queue's validate leg carries no role gate (the revalidate and purge legs do, since Phase 2). Tracked with the Phase-4 tail on RWT-NEW-core-functions-overhaul-2026-08-13." },
|
|
40
|
+
"ci_to_evidence_export_authorize": { guidance: "Use when a designated authority authorizes an export that packages CI for evidentiary use or external legal process. Distinct from routine reporting/printing and from internal investigative notes export.", logicNotes: "High-risk output authorization. Must enforce: (1) explicit purpose (e.g., charging, discovery, court order), (2) scope minimization, (3) redaction of protected victim info unless ROI/legal exception, (4) CI vs evidence separation and chain-of-custody expectations, (5) supervisory approval where required, (6) watermarking / export labeling, (7) immutable audit logging of payload metadata + recipient context. Export must be authorization-bounded: only data the principal is allowed to view can be exported unless an explicit break-glass scope covers it. | v1 2026-08-13 — BUILT (exportRegister.ts requestExport/decideExport/releaseExport with real SoD: decider ≠ requester, prosecution hard gate); as-built eligible deciders are ANY admin-role holder at the org (Crysta ruling in-code) — looser than the CIRO-only bound; convergence at Phase 2. | CLOSED 2026-08-19 (Phase-2 residue (iv)): the any-admin decider arm is deleted; a real CIRO seat is seeded and decideExport composes CIRO bounds ∨ break-glass grant with separation of duties intact. [CVC133-AUDIT 2026-09-10]" },
|
|
41
|
+
"deconfliction_alert_acknowledge": { guidance: "Use for the user action that explicitly acknowledges a deconfliction alert.", logicNotes: "Alert acceptance may require the user to confirm awareness and may trigger follow-up actions such as linking records, notifying a team, or initiating a deconfliction workflow. Should be logged to audit." },
|
|
42
|
+
"deconfliction_unmask": { guidance: null, logicNotes: "Seeded 2026-08-13. As-built clamp is Case-Agent-only (deconflictionStore.ts); these bounds are the role-eligibility floor above it. Refuses when the owner case is dark." },
|
|
43
|
+
"determination_perform": { guidance: "Use for determination recording actions. The meaning of the determination is defined elsewhere in the information model.", logicNotes: "Often gated by training/certification state (e.g., certified assessor). | ENFORCED 2026-09-06 (CVC134-135-AUDIT, Crysta: 'it's not the seal that matters, it's the findings surface itself. make the permission model real'): every Findings-cockpit opener in the monolith routes through openCockpit, which resolves HTI_CAPTURE_AUTHZ.access('determination_perform') — refuses at the data layer and paints the opener disabled with the plain-language reason; walked across seven seats (BHP/investigator allowed via Always, case_nav via Default On, screener/crisis_response/volunteer refused by name, multi-role rule holding both ways). Screenings and assessments already carried training gates; this closed the concluding step. [CVC133-AUDIT 2026-09-10] | Legal Advocate added to Default On 2026-09-30 (LEGAL-ADVOCATE-BOUNDS — Crysta ruling: 'They should have these permissions'). Level is the agent's derivation: Default On, matching Case Navigator/Advocate, the nearest casework role — move it if she wants Always." },
|
|
44
|
+
"disclose_external_request": { guidance: "Use when an operational user initiates a disclosure workflow. Authorization is handled by a separate function (designated authority approval).", logicNotes: "Must capture purpose, legal basis, consent/ROI state, payload scope, counterparty, and time bounds. Must be auditable. Submission should not disclose data until approved. | BOUNDS 2026-09-10 (CVC133-AUDIT, Crysta ruling R3): the row was user-relevant with no user bound — a deny for every operational seat; Always now mirrors the four user roles the approval half (disclose_external) names: VSP LE Liaison, Investigator, Legal Advocate, Case Navigator/Advocate." },
|
|
45
|
+
"enrollment_manage": { guidance: null, logicNotes: "Seeded 2026-08-13 (Phase-0 overhaul, agent-seeded per approved D1; split from case_edit per D13). Sibling codes: exit_discharge_conduct, service_log_manage, goals_plan_manage, needs_priorities_conduct, profile_domain_edit. | ENFORCED 2026-08-20 (CF-PHASE3-WAVES-3A–3D): the monolith's captureFunctionAccess (window HTI_CAPTURE_AUTHZ) gates the enrollment commit paths and paints the openers disabled-with-reason; regression net tools/smoke/flows/capture-authz-wave3.js. [CVC133-AUDIT 2026-09-10]" },
|
|
46
|
+
"exit_discharge_conduct": { guidance: null, logicNotes: "Seeded 2026-08-13 (D13 split). High-consequence leg deliberately split from enrollment_manage so agencies can enable enrollment without enabling discharge. | ENFORCED 2026-08-20 (CF-PHASE3-WAVES-3A–3D): the monolith's captureFunctionAccess (window HTI_CAPTURE_AUTHZ) gates the exit/discharge wizard incl. the involuntary-discharge cascade; regression net tools/smoke/flows/capture-authz-wave3.js. [CVC133-AUDIT 2026-09-10]" },
|
|
47
|
+
"export_deidentified": { guidance: "Use for member-owned reporting exports (Echo). Outputs are derived from a single Member’s contributed data only. This function does not authorize cross-member aggregation, community datasets, or any platform-wide de-identified datasets. External disclosure/export approval policies may still apply depending on member settings.", logicNotes: "Treat export as sensitive even when de-identified. Require explicit purpose + logging for each export. Keep this distinct from any future HTI Labs–only system-wide aggregation or research-grade datasets." },
|
|
48
|
+
"goals_plan_manage": { guidance: null, logicNotes: "Seeded 2026-08-13 (D13 split). | ENFORCED 2026-08-20 (CF-PHASE3-WAVES-3A–3D): the monolith's captureFunctionAccess (window HTI_CAPTURE_AUTHZ) gates plan/goal/action-step commits; regression net tools/smoke/flows/capture-authz-wave3.js. [CVC133-AUDIT 2026-09-10]" },
|
|
49
|
+
"idb_record_create": { guidance: "Use for intelligence record creation (not case creation).", logicNotes: "May require CI governance controls (validation/review/expiration)." },
|
|
50
|
+
"indicator_manual_add": { guidance: null, logicNotes: "Seeded 2026-08-13. LEADS inclusion CONFIRMED 2026-08-14 by the Phase-2 runtime trace (G9): the Add Alert Indicator opener carries no app gate and the drawer opens live under data-app=\"leads\" (Chrome-driven gesture, CORE-FUNCTIONS Phase 2 session); platform_relevance PAVE·THREAD·LEADS stands. | Demoted from the default user-role config view 2026-08-19 (Crysta ruling, UDD+Core-Functions residue kickoff § 6 Q4, executing the Phase-0 worksheet § I item 5 flag; G9 demoted, not cut — bounds + resolver behavior unchanged). | ENFORCED 2026-10-01 (CAPTURE-AUTHZ-WAVE4): HTI_CAPTURE_AUTHZ.guard at the Add Indicator drawer's opener and its save; regression net tools/smoke/flows/capture-authz-wave4.js." },
|
|
51
|
+
"investigation_create_claim": { guidance: "Use for the combined ‘create investigation + claim’ operational action. If implementation separates these, split into two functions.", logicNotes: "Often requires team workflow eligibility and may trigger deconfliction checks." },
|
|
52
|
+
"investigation_session_run": { guidance: null, logicNotes: "Seeded 2026-08-13." },
|
|
53
|
+
"investigative_database_search": { guidance: "Use for in-product search across the investigative datastore (first-party). Distinct from open-source or external intelligence search.", logicNotes: "Search results must be filtered by ABAC, org scope, and sensitivity tier. Queries and access may be audited. Rate limiting and purpose restrictions may apply." },
|
|
54
|
+
"investigative_request_send": { guidance: "The LEADS-workforce door. Distinct from message_send (any platform message) and from investigative_database_search (searching the account's own IDB): this is the ask that leaves the agency for HTI Labs. Rides the Platform Help chooser and the leads-app support path. Never a claim-side act — 'Request a lead' is an investigative request TO HTI Labs.", logicNotes: "MINTED 2026-09-10 (CVC133-AUDIT, Crysta ruling R4). Until today the Platform Help chooser (HTI_hasLEADSAccess) resolved investigative_database_search as a proxy (2026-09-06, CVC134-135-AUDIT R1 'Ask the permissions model') because no function named the act while message_send's definition claimed it. Bounds mirror the proxy (Investigator + Intelligence Analyst Always) so nothing on screen changes; the door now resolves this code and message_send no longer claims the act." },
|
|
55
|
+
"lead_create": { guidance: "Operational creation of LEADS leads/tips. Subsequent publication/routing is separate.", logicNotes: "May be constrained by team workflow and viewing policy; does not imply broad browsing." },
|
|
56
|
+
"lead_publish": { guidance: "Use for making a lead actionable beyond its creator’s draft context.", logicNotes: "Publishing should apply policy constraints (purpose, counterparty if shared) and audit events. | 2026-08-13: reject/unpublish absorbed here (one approval act, both valences — leadLifecycleStore reject/unpublish); lead disposition/priority triage is lead_triage_manage." },
|
|
57
|
+
"lead_route_assign": { guidance: null, logicNotes: "Seeded 2026-08-13. HTI routing act, distinct from post-claim case_assign_reassign." },
|
|
58
|
+
"lead_triage_manage": { guidance: null, logicNotes: "Seeded 2026-08-13. Reject/unpublish are lead_publish's absorbed scope, not this. Personal save/follow deliberately excluded (non-function per the ratified ledger)." },
|
|
59
|
+
"magic_link_share_send": { guidance: "Use for ad-hoc, controlled sharing via a secure link. Distinct from standard in-product sharing/referrals between authenticated users.", logicNotes: "Magic links must be time-bound, revocable, and bound to a specific recipient context when possible. Access via link should enforce ABAC, sensitivity tier, and consent/ROI restrictions. All access events must be logged. | As-built note 2026-08-13: magic link is one of six delivery methods inside the single Share composer; the composer is the act, the method is configuration. Coded separately because magic-link sends are separately configurable (they leave the platform). | ENFORCED 2026-08-19 (CF-PHASE3-WAVE1): the magic-link method option in the Share composer gates on these bounds (disabled-with-reason + a triggerSend data-layer backstop). [CVC133-AUDIT 2026-09-10] | Legal Advocate added to Default On 2026-09-30 (LEGAL-ADVOCATE-BOUNDS — Crysta ruling: 'They should have these permissions'). Level is the agent's derivation: Default On, matching Case Navigator/Advocate, VSP LE Liaison and Crisis Response on this row. | 2026-10-19 (Crysta ruling, Next Steps v2.1 walk): Screener (Initial Screen) moved Default Off → Default On ('let's change Screener to be default on — I can always change my mind down the road when the on-platform network is much more built out'); Supervisor (admin role) added as Default On ('supervisor should default on') — the row is admin-relevant from this date so the admin-role column binds; a seat whose only user role was Screener + Supervisor had been refused the method. Volunteer stays Default Off." },
|
|
60
|
+
"mandatory_report_send": { guidance: "Gates WHO may send a mandatory report; it never gates whether the duty can be met. A user without this function flags 'needs a mandatory report,' which routes as an internal authority report (the share flow, ROI question skipped) to the agency's designated internal reporting team, who send the legal report. Partner-level settings never block reporting purposes.", logicNotes: "RATIFIED Crysta 2026-08-23 (mandatory-report escalation design round: the function + these role defaults + the escalation notification kind ratified as one steward batch — 'I'm shocked we don't already have this function in our codebook'). Canon homes: GDR § 5.79 legal-reports amendment + § 5.44.1 INTERNAL-ROUTING-IS-A-SHARE (both 2026-08-23). TEAM RUNG (Crysta, same ruling): this function also rides team workflows — a team whose configured workflow includes it is recognized as the agency's reporting team (the internal-reporting-destination derivation consumes this). PLACED ON NOTION 2026-09-10 (CVC133-AUDIT; authored repo-side 2026-08-23 per the safe_locations provisional precedent). STEWARD OPEN closed the same day (Crysta ruling R1, CVC133-AUDIT): the certified provider roles (behavioral health, medical) are Default On as professional mandated reporters. User roles not listed in any bound resolve to a deny ('not part of your roles')." },
|
|
61
|
+
"member_account_report_generate": { guidance: "Use for generating an internal-facing report about a member account. Distinct from platform-wide aggregate reporting and from client/case reporting.", logicNotes: "Scope must be constrained by org/team boundaries and least-privilege rules. Report generation should be auditable. Redact or exclude __ fields by default. | ENFORCED 2026-08-14 (Phase 2): Echo generateFinal (the grant-report freeze) gates on this code — a compact local bounds-layer gate, since Echo carries no full resolver. [CVC133-AUDIT 2026-09-10]" },
|
|
62
|
+
"member_onboarding_support": { guidance: "Use for HTI Labs support staff assisting members through onboarding and adoption, while keeping governance actions with MEM-ADM and platform admins.", logicNotes: "May include read-only access to onboarding checklists and configuration status; should not include role assignment or API key management. | Scope note 2026-08-13: the Manage-Agencies management actions — request survey, request a document, review edit requests — ride this function (as-built: resolveEditRequest already gates on it; the request acts adopt it at Phase 2)." },
|
|
63
|
+
"message_moderate": { guidance: null, logicNotes: "Seeded 2026-08-13. Per-user block/report are personal-safety affordances riding message_send, not this function." },
|
|
64
|
+
"message_send": { guidance: null, logicNotes: "Seeded 2026-08-13. Typed threads post through the one canonical HTI_MESSAGES_API channel; the leads-app store mirrors the platform composer verbatim — one act, one code. Per-user block/report are personal-safety affordances riding this function. | 2026-09-10 (CVC133-AUDIT, Crysta ruling R4): the investigative-request / Ask-HTI ask is its own function, investigative_request_send — this row no longer claims it. The earlier note that the LEADS chooser gate covered 'HTI staff + leads_investigator only' is superseded: since 2026-09-06 the door asks the permission model (investigative_request_send as of today)." },
|
|
65
|
+
"milestone_log": { guidance: null, logicNotes: "Seeded 2026-08-13. Independent of embedding sessions (logs from the case timeline and network page). | Demoted from the default user-role config view 2026-08-19 (Crysta ruling, UDD+Core-Functions residue kickoff § 6 Q4, executing the Phase-0 worksheet § I item 5 flag; F3 demoted, not cut — bounds + resolver behavior unchanged)." },
|
|
66
|
+
"needs_priorities_conduct": { guidance: null, logicNotes: "Seeded 2026-08-13 (D13 split). ONE code deliberately: needs + priorities are a single shared panel as-built (same mapping_version needs_assessment_decline_v1, both apps wired by the same setupPrioritiesPanel calls). Split later only if agencies need to configure them apart. | ENFORCED 2026-08-20 (CF-PHASE3-WAVES-3A–3D): the monolith's captureFunctionAccess (window HTI_CAPTURE_AUTHZ) gates the shared panel's commits in both apps; regression net tools/smoke/flows/capture-authz-wave3.js. [CVC133-AUDIT 2026-09-10] | Legal Advocate added to Default On 2026-09-30 (LEGAL-ADVOCATE-BOUNDS — Crysta ruling: 'I agree, and want you to do it'): the 2026-08-13 seed omitted it here while binding it Default On on the sibling capture codes, so a Legal Advocate running an intake was refused at the Immediate Priorities step. | Adult Hope Scale placed under this code 2026-10-01 (Crysta: 'I agree'): it shares the Needs & Hope substep with the Needs Assessment (NEEDS_AND_HOPE recommendations 2026-05-14) and no function had named it, so the runner opened and committed it for any seat. Enforced by the instrument map in CAPTURE-AUTHZ-WAVE4 (HS → needs_priorities_conduct)." },
|
|
67
|
+
"network_corpus_access": { guidance: null, logicNotes: "Seeded 2026-08-13. As-built: the ONE hard internal gate (access.ts isHtiInternal). No member bounds — unlisted member roles are out of scope by design." },
|
|
68
|
+
"note_open_departed_author": { guidance: "The one exception to the rule that only a note's author changes its visibility (Spec v2 - Narrative notes, rule 10, signed by Crysta 2026-10-05). Use only when the author's account has been deactivated. Each note opened this way shows \"Opened by [admin] on [date]\", and the act is recorded in the case history. It never applies to a note whose author is still active.", logicNotes: "Off until an account turns it on (Default Off for Account Admin; no other role holds it). PAVE and Thread notes only; LEADS is unchanged. One note at a time: Private to me -> Our account only, never to Can be shared. The words are not shown to the admin before the note is opened. Added 2026-10-05 by Claude while building the signed Narrative notes spec (kickoff KICKOFF_INFOSCOPE_NARRATIVE_NOTES_2026-10-02 WI-3), for Crysta's review." },
|
|
69
|
+
"onboarding_config_sign_off": { guidance: null, logicNotes: "Seeded 2026-08-13." },
|
|
70
|
+
"open_source_search": { guidance: "Use for searches that query external/open sources (not the internal investigative database). Keep tool/vendor details out of the function; integration-specific behavior lives elsewhere.", logicNotes: "May be implemented via integrated OSINT tools or external links. Should record minimal audit metadata when required (who searched, when, case context) without storing prohibited content. Respect terms of use and jurisdiction rules." },
|
|
71
|
+
"person_association_update": { guidance: "Use for editing person-entity associations (roles, relationships, contact points) rather than editing narrative content. Keep the function data-agnostic; policy governs which attributes can be edited in which contexts.", logicNotes: "Changes should be provenance-tracked (who/when/why). Some attributes may be restricted by sensitivity tier, role certification, or investigative authority. | Re-scoped 2026-08-13 (Phase-0 overhaul): LEADS → LEADS/PAVE/THREAD — PAVE Persons Network + Household relationship EDGES are fully built equivalents. Ownership ruling: this code owns person-network roles/relationship edges; subject-profile household composition + emergency contacts are profile_domain_edit." },
|
|
72
|
+
"person_merge_manage": { guidance: null, logicNotes: "Seeded 2026-08-13. Cross-org confirm is the approval leg of the same function (D15 pattern); split later only if agencies need to configure them apart. Ruling record — 2026-11-03 (Crysta): THREAD added — Thread's PAVE-to-Thread person-match review queue (confirm_merge / keep_separate / defer) is this act. Thread bounds: Crisis Response Default On; Volunteer, Public Reporter, Mandatory Reporter Never; the member admin is not bound (admin functions only, ruling 2026-11-02)." },
|
|
73
|
+
"platform_perm_modify": { guidance: "HTI platform governance function. Defines the outer boundary of what is possible.", logicNotes: "Reserved for PLT-ADM. Should never be available to member accounts." },
|
|
74
|
+
"profile_domain_edit": { guidance: null, logicNotes: "Seeded 2026-08-13 (D13 split). Thread scope = the Signal-step subset (stripped household card + demographics); the full domain set is PAVE (Household & Relationships and Immigration & Legal Status carry pave-only gating as-built). Household composition + emergency contacts live HERE; person-network roles/relationship edges are person_association_update. | Re-scoped 2026-08-19/20 (Crysta ruling, wave-3d enforcement session): LEADS added to Platform Relevance — the leads-app Person-page demographics/nationality/physical edits are the same act on the same person record. Investigator + Intelligence Analyst added to Always (platform-required for investigators, analysts, and HTI analysts; HTI analysts are dual-roled intel_analyst + PLT-SUP seats, so the user-role grant covers them — no new role minted). | ENFORCED 2026-08-20 (CF-PHASE3-WAVES-3A–3D): the monolith's captureFunctionAccess (window HTI_CAPTURE_AUTHZ) gates the profile-domain commits and the leads-app demographicsStore.ts consults the same bounds; regression net tools/smoke/flows/capture-authz-wave3.js. [CVC133-AUDIT 2026-09-10] | Legal Advocate added to Always 2026-09-30 (LEGAL-ADVOCATE-BOUNDS — Crysta ruling on the partner-feedback card 'Admin account can edit juvenile justice': 'I agree, and want you to do it'). The 2026-08-13 seed omitted Legal Advocate here while binding it on session_create (Always) and on four sibling capture codes (Default On), so a Legal Advocate could start a session and not fill in its profile. The refused seat was Legal Advocate + Account Admin; the admin role stays unbound here (CAM invariant 5)." },
|
|
75
|
+
"record_activity_view": { guidance: null, logicNotes: "Seeded 2026-08-13. Case-grain everyday forensic view — distinct from the platform-grain audit_log_view_* codes (admin-framed, not v1)." },
|
|
76
|
+
"record_print": { guidance: "Use for producing a printable/PDF representation of an on-screen record/report. Output is constrained to the caller’s effective access (role, training, clearance, legal basis, purpose, consent/ROI, etc.).", logicNotes: "Printing is an output action and should be separately grantable per role.\n\nRequirements:\n- Apply the same row-level and field/component-level redaction rules as normal viewing.\n- Do not expand scope beyond what the user can view.\n- Treat print as an export-like event: watermark where required and log who/what/when/purpose.\n- If the platform supports multiple print templates (assessment, report, case summary), template selection must not bypass access constraints." },
|
|
77
|
+
"referral_receive_external": { guidance: "Use for the system/user action of receiving an external referral. Distinct from accepting/claiming the case and from internal referrals.", logicNotes: "Validate sender identity and ensure an approved counterparty and legal basis/purpose are present. Apply minimum-necessary data rules and map inbound payloads to internal schema. Create audit events for receipt and ingestion. | 2026-09-10 (CVC133-AUDIT, Crysta ruling R2): Case Navigator/Advocate and Prosecutorial Reviewer were listed in both Always and Default On — Always stands (what the resolvers already computed); the Default On duplicates are removed." },
|
|
78
|
+
"referral_receive_internal": { guidance: "Use for inbound internal referrals (from other HTI apps or internal teams). Distinct from external counterparty referrals.", logicNotes: "Enforce internal routing rules and confidentiality constraints (team boundaries, staff/volunteer segregation where applicable). Ensure linkage back to the source record and preserve provenance. Log receipt events." },
|
|
79
|
+
"referral_send_external": { guidance: "Use for outbound transmission and revocation of referrals/shares. Distinct from recipient acceptance/claim and from internal collaboration notes.", logicNotes: "Sending must enforce minimum-necessary data, purpose, counterparty, and ROI/legal-basis rules. | Edited 2026-08-13 (Phase-0 overhaul): the legacy 'or revoke' definition clause moved to the new share_revoke code." },
|
|
80
|
+
"referral_send_internal": { guidance: "Use for outbound transmission and revocation of referrals/shares. Distinct from recipient acceptance/claim and from internal collaboration notes.", logicNotes: "Sending must enforce minimum-necessary data, purpose, counterparty, and ROI/legal-basis rules. | Edited 2026-08-13 (Phase-0 overhaul): the legacy 'or revoke' definition clause moved to the new share_revoke code. Re-scoped PAVE → THREAD/PAVE — the built send leg is Thread→PAVE (sendReferral); a PAVE-initiated internal referral is future." },
|
|
81
|
+
"roi_submit_manage": { guidance: "Use for managing consent/ROI artifacts that enable lawful information sharing. Distinct from the actual share/referral send action.", logicNotes: "ROI handling must capture signature, effective dates, scope of disclosure, counterparties, and revocation state. Changes should be versioned and auditable. Downstream sharing actions must reference an active ROI where required. | Scope note 2026-08-13: ROI activate/renew (the 4-mode wizard) and status supersession ride this function's manage verb; terminal revocation is the new share_revoke code." },
|
|
82
|
+
"role_assign": { guidance: "Use for role assignment and revocation. Role bundles determine function eligibility; policies determine data scope.", logicNotes: "Role assignment should be audited. Some assignments may be restricted by agency configuration and training prerequisites." },
|
|
83
|
+
"roles_accounts_toggle": { guidance: null, logicNotes: "Code + definition + admin-relevance drafted by Claude 2026-07-09 (Crysta-delegated edit — the row shipped in the codebook export with no Code; the seeded repo registry data/cvcs/core_functions.yaml carried code:null until this edit). Naming follows the codebook's dominant object_verb convention (account_suspend · api_key_manage). Admin-relevance set to Yes to match the Always (Admin Roles) bounds already on the row. Crysta to review. | RATIFIED 2026-09-10 (CVC133-AUDIT, Crysta non-veto): code + definition stand; wired live on the Platform User Management roster (screens.jsx) since Phase 1." },
|
|
84
|
+
"sandbox_environment_manage": { guidance: "HTI Labs-only. Supports safe testing without exposing live member data.", logicNotes: "Prefer synthetic or de-identified data. Any live-data mirroring must be explicitly governed and logged." },
|
|
85
|
+
"screening_conduct": { guidance: "Use for the action of conducting screenings (answering and submitting the screening instrument). Distinct from viewing screening responses.", logicNotes: "May require training/certification. Enforce required-question logic, skip patterns, and workflow state gating. Ensure responses are tied to the correct case/session and are auditable. | Legal Advocate added to Default On 2026-10-01 (CAPTURE-AUTHZ-BOUNDS-GAPS — Crysta: 'those are gaps that need fixed'): the row bound it nowhere, so a Legal Advocate running an intake was refused every screening — the same shape as LEGAL-ADVOCATE-BOUNDS 2026-09-30. Level is the agent's derivation: Default On, matching Case Navigator/Advocate. | ENFORCED 2026-10-01 (CAPTURE-AUTHZ-WAVE4): HTI_CAPTURE_AUTHZ.guard at the Initial Screen, the General Intake Screening sections (read-only for a refused seat) and the runner; regression net tools/smoke/flows/capture-authz-wave4.js. Instruments (Crysta 2026-10-01): Initial Screen, General Intake Screening, Lethality Assessment (LAP), Injury & Strangulation Screening, OCAT. | Platform Relevance PAVE → PAVE/THREAD 2026-10-01 (Crysta: 'Please address / reword'): Thread's Screen step and its Lethality Screen run through the same guard." },
|
|
86
|
+
"screening_view": { guidance: "Use for read-only access to completed screening instruments and outputs. Distinct from conducting screenings.", logicNotes: "Apply minimum-necessary redaction and role-based access controls. Log access for audit. Viewing should not imply the ability to edit responses. | As-built note 2026-08-13: currently emergent — anyone with case access sees committed screening responses. Becomes independently enforceable when Level-3 visibleGroups gating carries the screening domain group." },
|
|
87
|
+
"service_log_manage": { guidance: null, logicNotes: "Seeded 2026-08-13 (D13 split). The motivating differential: volunteers may log services (Default On here) while never discharging (exit_discharge_conduct). | ENFORCED 2026-08-20 (CF-PHASE3-WAVES-3A–3D): the monolith's captureFunctionAccess (window HTI_CAPTURE_AUTHZ) gates service add/close/why-not commits; regression net tools/smoke/flows/capture-authz-wave3.js. [CVC133-AUDIT 2026-09-10]" },
|
|
88
|
+
"session_create": { guidance: "Use for creating a work session container that structures multi-step workflows (distinct from creating the submission record itself if those are separate concepts).", logicNotes: "Session creation may establish context such as org, role profile, channel/source, and timestamps. Often precedes intake submission creation and should be auditable for operational metrics (time-to-complete)." },
|
|
89
|
+
"share_config": { guidance: "Unified sharing policy configuration function for PAVE + Trail. Use for configuring sharing relationships, allowable counterparties, purpose constraints, and consent/ROI requirements, with changes versioned and auditable. Does not perform sharing itself.", logicNotes: "Merged sharing_policies_configure into share_config to avoid duplicate policy-config functions. Changes should require designated authority and be auditable. Effective sharing still evaluates purpose, legal basis, consent/ROI, and payload rules at runtime. | Scope note 2026-08-13: scope includes the Inter-Agency Sharing tab write, the Share-Purposes tab write, and the leads-app per-agency claim-broadcast toggle (sharingSettingsStore) — one gap cited twice in the alignment strategy, owned HERE; as-built the code gates only the LEADS-Deconfliction tab, the other tabs wire at Phase 2. Type-A internal viewing config is viewing_config_manage, not this. | CLOSED 2026-08-14 (Phase 2): the Inter-Agency Sharing · Share Purposes · Share Partners · Information Scope tab writes all gate through share_config. Team-scoped NARROWING of attached policies is the separate team_share_narrowing (Ava 2026-09-01), bound Default On for Team Admin. [CVC133-AUDIT 2026-09-10]" },
|
|
90
|
+
"share_revoke": { guidance: null, logicNotes: "Seeded 2026-08-13. As-built revokeShare carries ZERO gate — Phase 2 adds one. ROI activate/renew (the 4-mode wizard) and status supersession ride roi_submit_manage; only terminal revocation is this code. The legacy 'or revoke' clause in referral_send_internal/_external definitions is trimmed in the same pass. | ENFORCED 2026-08-19 (CF-PHASE3-WAVE1): the monolith's shareFunctionAccess guards revokeShare/revokeROI at the data layer and the Revoke button renders disabled-with-reason (GDR § 8.2); regression net tools/smoke/flows/share-authz-wave1.js. [CVC133-AUDIT 2026-09-10]" },
|
|
91
|
+
"share_rule_approve_cross_agency": { guidance: "Use for governance approvals that establish or change sharing rules.", logicNotes: "Approval should be auditable and may require designated authority." },
|
|
92
|
+
"share_vsp_to_le": { guidance: "Use for outbound VSP → LE shares/referrals where the VSP actor is initiating transmission to law enforcement. Distinct from (1) internal referral/hand-off, (2) LE receiving/ingesting an inbound referral, and (3) generic “disclose_external” disclosures. Use policy constraints (counterparty allowlist, purpose, sensitivity tier, approvals) rather than encoding sensitivity in the function name.", logicNotes: "This function represents the user/system action that transmits data from a VSP workflow to an LE recipient.\n\nExpected enforcement:\n- Verify the recipient is an approved LE counterparty and the destination channel is enabled by agency sharing configuration.\n- Require a valid legal basis and share purpose; enforce any consent/ROI requirements.\n- Enforce minimum-necessary data rules (field-level filtering/redaction based on sensitivity tier and role/clearance).\n- Apply required governance gates (e.g., designated authority approval) when configured; otherwise block.\n- Generate immutable audit events for preparation, approval (if any), and transmission; include what was shared (hashed/manifest), to whom, when, and under what purpose/legal basis.\n- Support revocation/recall only as policy allows (generally not possible once transmitted); log any attempted revocations.\n\nAs-built note 2026-08-13: implemented in PAVE/Thread as mandatory_reporting / authority_reporting purpose codes + legal-override attestation inside the Share composer; in LEADS the share gate is generic (content/stage/sign-off). Role-shape enforcement lands at Phase 2 of the functions overhaul.\n\nENFORCED 2026-08-19 (CF-PHASE3-WAVE1): the authority purpose pills in the PAVE/Thread Share composer gate on these bounds via shareFunctionAccess (disabled-with-reason + data-layer backstop); LEADS keeps its generic share gate. No seeded external user carries le_liaison_vsp, so user-grain demo seats refuse the authority purposes — a product call, flagged not taken. [CVC133-AUDIT 2026-09-10]" },
|
|
93
|
+
"srl_manage": { guidance: null, logicNotes: "Seeded 2026-08-13. As-built rides the same canDirectEdit gate inside the team blocks (roAddService/roRemoveService) — but the SRL is a distinct data entity feeding /services, and delegating SRL upkeep (e.g. to DATA-ADM) without full profile edit is a real config difference. Distinct-in-configuration => distinct code." },
|
|
94
|
+
"supervisee_thread_view": { guidance: null, logicNotes: "Seeded 2026-08-13. A real access grain: unions supervisee threads into the supervisor's inbox." },
|
|
95
|
+
"support_ticket_triage": { guidance: "Use for HTI Labs support operators. Does not grant case content access; focuses on operational support workflows.", logicNotes: "Should default to non-content metadata and diagnostics. Any content exposure requires explicit policy gating or member-provided artifacts. Ruling record — 2026-11-03 (Crysta): THREAD and PAVE added to Platform Relevance — Thread's Help-modal support reply (HTI Support replying to a member's ticket) is this act; bounds unchanged (PLT-SUP, PLT-ADM Always)." },
|
|
96
|
+
"system_diagnostics_view": { guidance: "Use for HTI Labs support workflows (debugging, performance, incident triage) with strict redaction and data minimization.", logicNotes: "Prefer aggregated/metadata logs. Access to member audit logs or sensitive record payloads should be separately governed." },
|
|
97
|
+
"team_config_manage": { guidance: "Use for account-governance team structure and admin scoping. This is a MEM-ADM responsibility. TEAM-ADM should not use this function to change team structures or its own scope; TEAM-ADM should use team-level workflow configuration functions for changes within an already-assigned team scope.", logicNotes: "This function changes scope boundaries. Treat as governance-impacting and auditable. | Merge note 2026-08-13 (D7): team_workflow_config_manage RETIRED into this code — the built TeamWorkflowEditor/TeamAccessView already gate on team_config_manage; one code, definitions absorb both. | 2026-10-04: the D7 merge is reversed — team_workflow_config_manage is restored as the team-level function (workflow list, exit checklist, open/closed to direct shares). This code keeps team structure, admin scoping, the account's front door and the report-flag destination; its holders may also do the team-level acts." },
|
|
98
|
+
"team_membership_manage": { guidance: "Use for team-scoped admin actions that change which users participate in a workflow container (team).", logicNotes: "Team membership changes can affect workflow surfaces and collaboration; changes should be auditable." },
|
|
99
|
+
"team_share_narrowing": { guidance: "The narrow-only half of sharing configuration, split out so a Team Admin can tighten their own team without holding share_config (which opens the whole Policies surface). Scope = the teams the seat administers; the acts = withhold a field group or a partner from what the team's attached policies allow, and lift that narrowing again. Widening, attaching, retiring, or editing a policy stays share_config.", logicNotes: "RULED Ava 2026-09-01 (Policies UX rulings round, against the recommendation): 'Team Admins may narrow their own team's policies.' Implication recorded the same day: share_config is Always Account Admin / Never Team Admin, so opening it would grant the whole surface — the honest shape is a distinct narrow-only function bound Default On for Team Admin. Stored shape unchanged: the team-narrowing species rows (policies.sharingPolicies[].purposeScope / purposeScopeItems), authored in the policy room's 'Teams it narrows' section (POLICIES-SHIP-5) and on the team card's Sharing section. PLACED ON NOTION 2026-09-10 (CVC133-AUDIT; authored repo-side 2026-09-02 per the mandatory_report_send / safe_locations provisional precedent)." },
|
|
100
|
+
"team_workflow_config_manage": { guidance: "Use for team-level workflow configuration under MEM-ADM governance. Intended for TEAM-ADM and delegated supervisors.", logicNotes: "Keep changes auditable; should not grant case-content visibility beyond what operational roles/policies allow. | History: taken out of v1 on 2026-08-13 by a merge into team_config_manage (D7), which is Never for Team Admin — so the role this function was written for lost it. | RESTORED 2026-10-04 (Crysta 2026-10-02: 'teams have profiles. Most of the info in those profiles should be governed by a function that can be enabled on the Team Admin role'; 2026-10-03: 'Please, just solve it'). v1 again. Account Admin Always; Team Admin Default On (an account may switch it off under Roles & Access). Scope = the teams the seat belongs to. Governs, on a team's profile: its workflow function list, its exit checklist, and whether the team can be named directly on a share. Creating/deleting teams, admin scoping, the account's front door and the report-flag destination stay team_config_manage; a holder of team_config_manage may also do these team-level acts." },
|
|
101
|
+
"training_gate_manage": { guidance: "Use for certification-linked access governance. Intended for member admins to ensure users only exercise functions once required training/certification is satisfied.", logicNotes: "This is a control-plane entitlement and should not grant content visibility. Changes should be auditable." },
|
|
102
|
+
"usr_manage": { guidance: "Use for identity lifecycle and account administration actions. Does not imply any case-content visibility.", logicNotes: "Typically requires an admin role (e.g., MEM-ADM, PLT-ADM). Evaluate in context of the authorization decision (agency, legal basis, break-glass if applicable). | Boundary note 2026-08-13: member deactivate/reactivate (agency-scoped, reversible) rides this function; account_suspend is account-grain, platform-only, and separate." },
|
|
103
|
+
"viewing_config_manage": { guidance: null, logicNotes: "Seeded 2026-08-13. Type A viewing config is not sharing config (share_config); the CAM's viewing-levels rulings govern what this configures." },
|
|
104
|
+
"viewing_level_1_search": { guidance: "One of the three Type-A internal-viewing level functions (levels 1–3 are functions specified in platform roles; level 0 is the derived absence of all three). Level 1 is the deconfliction-adjacent grain: a search hit tells the user a case exists without exposing content. Levels 1 and 2 carry no data-type dimension.", logicNotes: "Effective viewing level = the highest of the three level functions the user's roles resolve to (grant = Always / Default-On, or Default-Off where agency-enabled; multi-role union), clamped by the team-set level — most restrictive wins; the team axis clamps down, never up. Own/claimed cases are always fully visible. Deconfliction > Viewing. Absence of all three functions = Level 0 (not a configurable setting). Source rulings: CAM inline comments, Crysta Price 2026-03-17 (captured in Final CVCs/NOTION_DISCUSSIONS)." },
|
|
105
|
+
"viewing_level_2_autocomplete": { guidance: "One of the three Type-A internal-viewing level functions. Level 2 is a step more exposing than level 1: the system volunteers case identity while the user types, unprompted. Levels 1 and 2 carry no data-type dimension.", logicNotes: "Effective viewing level = the highest of the three level functions the user's roles resolve to (grant = Always / Default-On, or Default-Off where agency-enabled; multi-role union), clamped by the team-set level — most restrictive wins; the team axis clamps down, never up. Own/claimed cases are always fully visible. Deconfliction > Viewing. Keep the ladder monotone per role: no role should hold level 2 more freely than level 1. Source rulings: CAM inline comments, Crysta Price 2026-03-17 (captured in Final CVCs/NOTION_DISCUSSIONS)." },
|
|
106
|
+
"viewing_level_3_components": { guidance: "One of the three Type-A internal-viewing level functions. Level 3 is the only level that consults the by-data-type selection (Crysta 2026-03-17: \"Level 3 respects admin-set 'by-data-type' selection\"). The header identity floor (name / case ID / DOB) is the level-1 grant and is never suppressed.", logicNotes: "Effective viewing level = the highest of the three level functions the user's roles resolve to (grant = Always / Default-On, or Default-Off where agency-enabled; multi-role union), clamped by the team-set level — most restrictive wins; the team axis clamps down, never up. Own/claimed cases are always fully visible. Deconfliction > Viewing. Absence of all three functions = Level 0 (not a configurable setting). Source rulings: CAM inline comments, Crysta Price 2026-03-17 (captured in Final CVCs/NOTION_DISCUSSIONS)." },
|
|
107
|
+
};
|