@htilabs/platform-common-models 0.12.2 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cvcs/index.cjs +170 -21
  2. package/dist/cvcs/index.cjs.map +1 -1
  3. package/dist/cvcs/index.d.cts +182 -27
  4. package/dist/cvcs/index.d.ts +182 -27
  5. package/dist/cvcs/index.js +170 -21
  6. package/dist/cvcs/index.js.map +1 -1
  7. package/dist/enums/index.cjs +2 -0
  8. package/dist/enums/index.cjs.map +1 -1
  9. package/dist/enums/index.d.cts +5 -3
  10. package/dist/enums/index.d.ts +5 -3
  11. package/dist/enums/index.js +2 -0
  12. package/dist/enums/index.js.map +1 -1
  13. package/dist/{index-4DiJrn7y.d.ts → index-C0J3f169.d.ts} +1 -1
  14. package/dist/{index-qreOzXYS.d.cts → index-EPjPjR0z.d.cts} +1 -1
  15. package/dist/index.cjs +227 -28
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +4 -4
  18. package/dist/index.d.ts +4 -4
  19. package/dist/index.js +222 -28
  20. package/dist/index.js.map +1 -1
  21. package/dist/models/index.d.cts +2 -2
  22. package/dist/models/index.d.ts +2 -2
  23. package/dist/schemas/index.cjs +41 -7
  24. package/dist/schemas/index.cjs.map +1 -1
  25. package/dist/schemas/index.d.cts +130 -26
  26. package/dist/schemas/index.d.ts +130 -26
  27. package/dist/schemas/index.js +38 -7
  28. package/dist/schemas/index.js.map +1 -1
  29. package/dist/{cvc-Cp4uWnAa.d.cts → team-C4LJ5Tex.d.cts} +36 -1
  30. package/dist/{cvc-Cp4uWnAa.d.ts → team-C4LJ5Tex.d.ts} +36 -1
  31. package/dist/validation/index.cjs +155 -0
  32. package/dist/validation/index.cjs.map +1 -1
  33. package/dist/validation/index.d.cts +1 -1
  34. package/dist/validation/index.d.ts +1 -1
  35. package/dist/validation/index.js +153 -0
  36. package/dist/validation/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/__tests__/__snapshots__/cvc-sot.snap +5 -1
  39. package/src/__tests__/core-information-scope-invariant.test.ts +179 -2
  40. package/src/__tests__/cvc-sot-snapshot.test.ts +10 -0
  41. package/src/__tests__/cvc-structural.test.ts +3 -0
  42. package/src/__tests__/location-type-routing-invariant.test.ts +202 -0
  43. package/src/__tests__/team-directory-fields.test.ts +252 -0
  44. package/src/cvcs/coreInformationScope.v1.0.0.json +39 -5
  45. package/src/cvcs/index.ts +3 -0
  46. package/src/cvcs/locationType.v1.0.0.json +131 -16
  47. package/src/generated/cvc-enums.ts +5 -3
  48. package/src/index.ts +7 -0
  49. package/src/schemas/index.ts +8 -0
  50. package/src/schemas/team.ts +118 -0
  51. package/src/validation/index.ts +1 -0
  52. package/src/validation/team.ts +48 -0
  53. package/dist/{cvcEntry-ctHTp2df.d.cts → cvcEntry-DaDrEuTa.d.cts} +8 -8
  54. package/dist/{cvcEntry-ctHTp2df.d.ts → cvcEntry-DaDrEuTa.d.ts} +8 -8
@@ -1,4 +1,4 @@
1
- import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-ctHTp2df.js';
1
+ import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DaDrEuTa.js';
2
2
  import * as mongoose from 'mongoose';
3
3
  import { HydratedDocument, Connection, Model } from 'mongoose';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-ctHTp2df.cjs';
1
+ import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DaDrEuTa.cjs';
2
2
  import * as mongoose from 'mongoose';
3
3
  import { HydratedDocument, Connection, Model } from 'mongoose';
4
4
 
package/dist/index.cjs CHANGED
@@ -457,7 +457,10 @@ __export(src_exports, {
457
457
  SuggestionSourceKeys: () => SuggestionSourceKeys,
458
458
  SupportStrengthKeys: () => SupportStrengthKeys,
459
459
  SupportTopicKeys: () => SupportTopicKeys,
460
+ TEAM_MODEL_NAME: () => TEAM_MODEL_NAME,
460
461
  THREAD_INVOLVEMENT_ROLES: () => THREAD_INVOLVEMENT_ROLES,
462
+ TeamAppSchema: () => TeamAppSchema,
463
+ TeamDirectoryFieldsSchema: () => TeamDirectoryFieldsSchema,
461
464
  ThreadStatusKeys: () => ThreadStatusKeys,
462
465
  ThreadTypeKeys: () => ThreadTypeKeys,
463
466
  TimeScopeKeys: () => TimeScopeKeys,
@@ -478,6 +481,7 @@ __export(src_exports, {
478
481
  actionStepCompletionStatusSot: () => actionStepCompletionStatus_v1_0_0_default,
479
482
  actionStepTypeSot: () => actionStepType_v1_0_0_default,
480
483
  activityTypeSot: () => activityType_v1_0_0_default,
484
+ addTeamDirectoryFields: () => addTeamDirectoryFields,
481
485
  addressSchema: () => addressSchema,
482
486
  adminRolesSot: () => adminRoles_v1_0_0_default,
483
487
  administeringJurisdictionSot: () => administeringJurisdiction_v1_0_0_default,
@@ -715,6 +719,7 @@ __export(src_exports, {
715
719
  suggestionSourceSot: () => suggestionSource_v1_0_0_default,
716
720
  supportStrengthSot: () => supportStrength_v1_0_0_default,
717
721
  supportTopicSot: () => supportTopic_v1_0_0_default,
722
+ teamDirectorySchemaDefinition: () => teamDirectorySchemaDefinition,
718
723
  threadStatusSot: () => threadStatus_v1_0_0_default,
719
724
  threadTypeSot: () => threadType_v1_0_0_default,
720
725
  timeScopeSot: () => timeScope_v1_0_0_default,
@@ -7442,8 +7447,36 @@ function buildPlatformRoleSchema() {
7442
7447
  }
7443
7448
  var _platformRoleSchema = buildPlatformRoleSchema();
7444
7449
 
7445
- // src/schemas/cvcRegistry.ts
7450
+ // src/schemas/team.ts
7446
7451
  var import_mongoose8 = require("mongoose");
7452
+ var TEAM_MODEL_NAME = "Team";
7453
+ var teamDirectorySchemaDefinition = {
7454
+ /**
7455
+ * The platform apps this team works in, as {@link PLATFORM_TOOL} codes
7456
+ * (`"PAVE"`, `"THREAD"`, `"LEADS"`, ...). The referral preset only resolves
7457
+ * to a team whose `apps` includes `"PAVE"`.
7458
+ */
7459
+ apps: {
7460
+ type: [String],
7461
+ enum: [...PLATFORM_TOOL_VALUES],
7462
+ default: void 0
7463
+ },
7464
+ /**
7465
+ * The teams this team refers to, in priority order. The resolver takes the
7466
+ * first active target that works in PAVE and is not the sending team itself.
7467
+ */
7468
+ canReferTo: {
7469
+ type: [{ type: import_mongoose8.Schema.Types.ObjectId, ref: TEAM_MODEL_NAME }],
7470
+ default: void 0
7471
+ }
7472
+ };
7473
+ function addTeamDirectoryFields(schema) {
7474
+ schema.add(teamDirectorySchemaDefinition);
7475
+ return schema;
7476
+ }
7477
+
7478
+ // src/schemas/cvcRegistry.ts
7479
+ var import_mongoose9 = require("mongoose");
7447
7480
  var cvcRegistrySchemaDefinition = {
7448
7481
  // Versioning — semantic version of this registry bundle
7449
7482
  version: {
@@ -7463,7 +7496,7 @@ var cvcRegistrySchemaDefinition = {
7463
7496
  default: null
7464
7497
  },
7465
7498
  agencyId: {
7466
- type: import_mongoose8.Schema.Types.ObjectId,
7499
+ type: import_mongoose9.Schema.Types.ObjectId,
7467
7500
  default: null
7468
7501
  },
7469
7502
  // Lifecycle
@@ -7505,7 +7538,7 @@ var cvcRegistrySchemaDefinition = {
7505
7538
  // include / exclude lists from its base before applying its own overrides.
7506
7539
  // Indexed below so a base-version bump can find every dependent registry.
7507
7540
  basedOn: {
7508
- type: import_mongoose8.Schema.Types.ObjectId,
7541
+ type: import_mongoose9.Schema.Types.ObjectId,
7509
7542
  default: null
7510
7543
  }
7511
7544
  };
@@ -7514,7 +7547,7 @@ var cvcRegistrySchemaOptions = {
7514
7547
  collection: "cvc_registries"
7515
7548
  };
7516
7549
  function buildCvcRegistrySchema() {
7517
- const schema = new import_mongoose8.Schema(
7550
+ const schema = new import_mongoose9.Schema(
7518
7551
  cvcRegistrySchemaDefinition,
7519
7552
  cvcRegistrySchemaOptions
7520
7553
  );
@@ -7535,7 +7568,7 @@ function buildCvcRegistrySchema() {
7535
7568
  var _cvcRegistrySchema = buildCvcRegistrySchema();
7536
7569
 
7537
7570
  // src/schemas/cvcEntry.ts
7538
- var import_mongoose9 = require("mongoose");
7571
+ var import_mongoose10 = require("mongoose");
7539
7572
  var CVC_CODE_PATTERN = /^\d{3}(-\d{3}){6}$/;
7540
7573
  var CVC_KEY_PATTERN = /^[a-z][a-z0-9_]*$/;
7541
7574
  var cvcEntrySchemaDefinition = {
@@ -7601,7 +7634,7 @@ var cvcEntrySchemaDefinition = {
7601
7634
  // particular CVC family — e.g. `relevantMechanisms` on service_categories
7602
7635
  // entries (a cross-CVC reference into service_mechanisms by key).
7603
7636
  meta: {
7604
- type: import_mongoose9.Schema.Types.Mixed
7637
+ type: import_mongoose10.Schema.Types.Mixed
7605
7638
  }
7606
7639
  };
7607
7640
  var cvcEntrySchemaOptions = {
@@ -7612,7 +7645,7 @@ var cvcEntrySchemaOptions = {
7612
7645
  minimize: false
7613
7646
  };
7614
7647
  function buildCvcEntrySchema() {
7615
- const schema = new import_mongoose9.Schema(cvcEntrySchemaDefinition, cvcEntrySchemaOptions);
7648
+ const schema = new import_mongoose10.Schema(cvcEntrySchemaDefinition, cvcEntrySchemaOptions);
7616
7649
  schema.index(
7617
7650
  { domain: 1, version: 1, code: 1 },
7618
7651
  { unique: true }
@@ -10642,6 +10675,8 @@ var CoreInformationScopeKeys = {
10642
10675
  contact: "236-003-000-000-000-000-000",
10643
10676
  contact_info: "236-003-001-000-000-000-000",
10644
10677
  safe_locations: "236-003-002-000-000-000-000",
10678
+ priorities_safety: "236-003-003-000-000-000-000",
10679
+ encounter_location: "236-003-004-000-000-000-000",
10645
10680
  services: "236-004-000-000-000-000-000",
10646
10681
  contact_history: "236-004-001-000-000-000-000",
10647
10682
  service_history: "236-004-002-000-000-000-000",
@@ -12287,6 +12322,16 @@ var CvcEnvelopeSchema = import_zod.z.object({
12287
12322
  entries: import_zod.z.array(CvcEntrySchema)
12288
12323
  });
12289
12324
 
12325
+ // src/validation/team.ts
12326
+ var import_zod2 = require("zod");
12327
+ var ObjectIdHexSchema = import_zod2.z.string().regex(/^[0-9a-fA-F]{24}$/, "must be a 24-character hex ObjectId");
12328
+ var hasNoDuplicates = (values) => new Set(values.map((v) => v.toLowerCase())).size === values.length;
12329
+ var TeamAppSchema = import_zod2.z.enum(PLATFORM_TOOL_VALUES);
12330
+ var TeamDirectoryFieldsSchema = import_zod2.z.object({
12331
+ apps: import_zod2.z.array(TeamAppSchema).refine(hasNoDuplicates, "apps must not repeat an app").optional(),
12332
+ canReferTo: import_zod2.z.array(ObjectIdHexSchema).refine(hasNoDuplicates, "canReferTo must not repeat a team").optional()
12333
+ });
12334
+
12290
12335
  // src/cvcs/serviceCategories.v1.0.0.json
12291
12336
  var serviceCategories_v1_0_0_default = {
12292
12337
  domain: "service_categories",
@@ -22810,6 +22855,7 @@ var locationType_v1_0_0_default = {
22810
22855
  domain: "location_type",
22811
22856
  name: "Core Location Type",
22812
22857
  version: "1.0.0",
22858
+ _source: "Rows: hand-authored 2026-04-22 from the April Notion codebook export (co-8ff.5.12); codes, keys, titles and definitions are unchanged since. LOGIC columns (tier \xB7 anchors \xB7 anchorDefault \xB7 shareUnit \xB7 safetyDefault): htilabstech/prototype/data/cvcs/core_location_type.yaml @ 55088d44 (CVC-191 v1.1, logic amended 2026-10-01; read from origin/main; cross-checked against htilabstech/prototype/Final CVCs/Location (IC-4)/core - location_type \u2014 codebook 1.csv + 2.csv @ 55088d44), overlaid by scripts/gen-location-type.py. NOT absorbed: 8 canon rows the package does not publish (TRAFFICKING_OCCURRENCE, VICTIM_IDENTIFICATION, COMMERCIAL_SEX_AD_POSTING, TRAFFICKING_RECRUITMENT, BIRTHPLACE, COURT_LOCATION, LE_INTERVIEW_LOCATION, LE_AGENCY_LOCATION) and the 4 labels canon reworded on 2026-08-28.",
22813
22859
  levels: {
22814
22860
  "0": "Unknown or Missing",
22815
22861
  "1": "Category"
@@ -22835,7 +22881,12 @@ var locationType_v1_0_0_default = {
22835
22881
  selectable: true,
22836
22882
  parentCode: "191-000-000-000-000-000-000",
22837
22883
  childCodes: [],
22838
- definition: "Unknown or cannot be determined from the available information."
22884
+ definition: "Unknown or cannot be determined from the available information.",
22885
+ tier: "sentinel",
22886
+ anchors: [],
22887
+ anchorDefault: null,
22888
+ shareUnit: null,
22889
+ safetyDefault: null
22839
22890
  },
22840
22891
  {
22841
22892
  code: "191-000-000-000-000-000-002",
@@ -22844,7 +22895,12 @@ var locationType_v1_0_0_default = {
22844
22895
  selectable: true,
22845
22896
  parentCode: "191-000-000-000-000-000-000",
22846
22897
  childCodes: [],
22847
- definition: "Information may be withheld by preference or due to redaction; identity is anonymous or redacted."
22898
+ definition: "Information may be withheld by preference or due to redaction; identity is anonymous or redacted.",
22899
+ tier: "sentinel",
22900
+ anchors: [],
22901
+ anchorDefault: null,
22902
+ shareUnit: null,
22903
+ safetyDefault: null
22848
22904
  },
22849
22905
  {
22850
22906
  code: "191-000-000-000-000-000-003",
@@ -22853,7 +22909,12 @@ var locationType_v1_0_0_default = {
22853
22909
  selectable: true,
22854
22910
  parentCode: "191-000-000-000-000-000-000",
22855
22911
  childCodes: [],
22856
- definition: "No attempt was made to collect the information."
22912
+ definition: "No attempt was made to collect the information.",
22913
+ tier: "sentinel",
22914
+ anchors: [],
22915
+ anchorDefault: null,
22916
+ shareUnit: null,
22917
+ safetyDefault: null
22857
22918
  },
22858
22919
  {
22859
22920
  code: "191-001-000-000-000-000-000",
@@ -22862,7 +22923,14 @@ var locationType_v1_0_0_default = {
22862
22923
  selectable: true,
22863
22924
  parentCode: null,
22864
22925
  childCodes: [],
22865
- definition: "Where the client/person currently resides (residential location)."
22926
+ definition: "Where the client/person currently resides (residential location).",
22927
+ tier: "residence",
22928
+ anchors: [
22929
+ "person"
22930
+ ],
22931
+ anchorDefault: "person",
22932
+ shareUnit: "addresses",
22933
+ safetyDefault: "ask"
22866
22934
  },
22867
22935
  {
22868
22936
  code: "191-002-000-000-000-000-000",
@@ -22871,7 +22939,16 @@ var locationType_v1_0_0_default = {
22871
22939
  selectable: true,
22872
22940
  parentCode: null,
22873
22941
  childCodes: [],
22874
- definition: "The physical site where a service instance was delivered (office, outreach site, partner site, on-scene)."
22942
+ definition: "The physical site where a service instance was delivered (office, outreach site, partner site, on-scene).",
22943
+ tier: "service",
22944
+ anchors: [
22945
+ "service_instance",
22946
+ "agency_program",
22947
+ "person"
22948
+ ],
22949
+ anchorDefault: "service_instance",
22950
+ shareUnit: "service_history",
22951
+ safetyDefault: "ask"
22875
22952
  },
22876
22953
  {
22877
22954
  code: "191-003-000-000-000-000-000",
@@ -22880,7 +22957,14 @@ var locationType_v1_0_0_default = {
22880
22957
  selectable: true,
22881
22958
  parentCode: null,
22882
22959
  childCodes: [],
22883
- definition: "Where the client/victim/caller is physically located at the time of contact or service (operational safety location)."
22960
+ definition: "Where the client/victim/caller is physically located at the time of contact or service (operational safety location).",
22961
+ tier: "encounter",
22962
+ anchors: [
22963
+ "person"
22964
+ ],
22965
+ anchorDefault: "person",
22966
+ shareUnit: "addresses",
22967
+ safetyDefault: "ask"
22884
22968
  },
22885
22969
  {
22886
22970
  code: "191-004-000-000-000-000-000",
@@ -22889,7 +22973,16 @@ var locationType_v1_0_0_default = {
22889
22973
  selectable: true,
22890
22974
  parentCode: null,
22891
22975
  childCodes: [],
22892
- definition: "A location where an in-person meeting/contact/event occurred (e.g., meet location, arrest location, outreach contact site)."
22976
+ definition: "A location where an in-person meeting/contact/event occurred (e.g., meet location, arrest location, outreach contact site).",
22977
+ tier: "encounter",
22978
+ anchors: [
22979
+ "session",
22980
+ "event",
22981
+ "person"
22982
+ ],
22983
+ anchorDefault: "session",
22984
+ shareUnit: "encounter_location",
22985
+ safetyDefault: "ask"
22893
22986
  },
22894
22987
  {
22895
22988
  code: "191-005-000-000-000-000-000",
@@ -22898,7 +22991,14 @@ var locationType_v1_0_0_default = {
22898
22991
  selectable: true,
22899
22992
  parentCode: null,
22900
22993
  childCodes: [],
22901
- definition: "Where the client/person previously resided (historical residential location)."
22994
+ definition: "Where the client/person previously resided (historical residential location).",
22995
+ tier: "residence",
22996
+ anchors: [
22997
+ "person"
22998
+ ],
22999
+ anchorDefault: "person",
23000
+ shareUnit: "addresses",
23001
+ safetyDefault: "ask"
22902
23002
  },
22903
23003
  {
22904
23004
  code: "191-006-000-000-000-000-000",
@@ -22907,7 +23007,14 @@ var locationType_v1_0_0_default = {
22907
23007
  selectable: true,
22908
23008
  parentCode: null,
22909
23009
  childCodes: [],
22910
- definition: "A location used to determine jurisdiction, eligibility, or referral routing (e.g., county, city, CoC code, service area)."
23010
+ definition: "A location used to determine jurisdiction, eligibility, or referral routing (e.g., county, city, CoC code, service area).",
23011
+ tier: "encounter",
23012
+ anchors: [
23013
+ "person"
23014
+ ],
23015
+ anchorDefault: "person",
23016
+ shareUnit: "addresses",
23017
+ safetyDefault: "ask"
22911
23018
  },
22912
23019
  {
22913
23020
  code: "191-007-000-000-000-000-000",
@@ -22916,7 +23023,14 @@ var locationType_v1_0_0_default = {
22916
23023
  selectable: true,
22917
23024
  parentCode: null,
22918
23025
  childCodes: [],
22919
- definition: "A location inferred from ads/postings (posting city/region/board) used for analytics such as base location, travel, and heat maps."
23026
+ definition: "A location inferred from ads/postings (posting city/region/board) used for analytics such as base location, travel, and heat maps.",
23027
+ tier: "derived",
23028
+ anchors: [
23029
+ "person"
23030
+ ],
23031
+ anchorDefault: "person",
23032
+ shareUnit: "commercial_activity",
23033
+ safetyDefault: null
22920
23034
  },
22921
23035
  {
22922
23036
  code: "191-008-000-000-000-000-000",
@@ -22925,7 +23039,15 @@ var locationType_v1_0_0_default = {
22925
23039
  selectable: true,
22926
23040
  parentCode: null,
22927
23041
  childCodes: [],
22928
- definition: "A location representing a travel instance or visit (part of a travel log/itinerary), with time bounds."
23042
+ definition: "A location representing a travel instance or visit (part of a travel log/itinerary), with time bounds.",
23043
+ tier: "encounter",
23044
+ anchors: [
23045
+ "person",
23046
+ "event"
23047
+ ],
23048
+ anchorDefault: "person",
23049
+ shareUnit: "addresses",
23050
+ safetyDefault: "ask"
22929
23051
  },
22930
23052
  {
22931
23053
  code: "191-009-000-000-000-000-000",
@@ -22934,7 +23056,14 @@ var locationType_v1_0_0_default = {
22934
23056
  selectable: true,
22935
23057
  parentCode: null,
22936
23058
  childCodes: [],
22937
- definition: "A location associated with work, school, or business activity (legal or illicit), including known venues tied to an entity."
23059
+ definition: "A location associated with work, school, or business activity (legal or illicit), including known venues tied to an entity.",
23060
+ tier: "encounter",
23061
+ anchors: [
23062
+ "person"
23063
+ ],
23064
+ anchorDefault: "person",
23065
+ shareUnit: "addresses",
23066
+ safetyDefault: "ask"
22938
23067
  },
22939
23068
  {
22940
23069
  code: "191-010-000-000-000-000-000",
@@ -22943,7 +23072,14 @@ var locationType_v1_0_0_default = {
22943
23072
  selectable: true,
22944
23073
  parentCode: null,
22945
23074
  childCodes: [],
22946
- definition: "A location inferred from an IP address (geolocation-derived), used as a signal rather than a confirmed physical location."
23075
+ definition: "A location inferred from an IP address (geolocation-derived), used as a signal rather than a confirmed physical location.",
23076
+ tier: "derived",
23077
+ anchors: [
23078
+ "person"
23079
+ ],
23080
+ anchorDefault: "person",
23081
+ shareUnit: "commercial_activity",
23082
+ safetyDefault: null
22947
23083
  },
22948
23084
  {
22949
23085
  code: "191-011-000-000-000-000-000",
@@ -22952,7 +23088,14 @@ var locationType_v1_0_0_default = {
22952
23088
  selectable: true,
22953
23089
  parentCode: null,
22954
23090
  childCodes: [],
22955
- definition: "A location describing a program, shelter, project site, or provider location used for reporting (e.g., HMIS project descriptor)."
23091
+ definition: "A location describing a program, shelter, project site, or provider location used for reporting (e.g., HMIS project descriptor).",
23092
+ tier: "service",
23093
+ anchors: [
23094
+ "agency_program"
23095
+ ],
23096
+ anchorDefault: "agency_program",
23097
+ shareUnit: null,
23098
+ safetyDefault: "safe"
22956
23099
  },
22957
23100
  {
22958
23101
  code: "191-012-000-000-000-000-000",
@@ -22961,7 +23104,16 @@ var locationType_v1_0_0_default = {
22961
23104
  selectable: true,
22962
23105
  parentCode: null,
22963
23106
  childCodes: [],
22964
- definition: "A catch-all value used when none of the defined location types apply or when the role/context is unclear."
23107
+ definition: "A catch-all value used when none of the defined location types apply or when the role/context is unclear.",
23108
+ tier: "encounter",
23109
+ anchors: [
23110
+ "person",
23111
+ "session",
23112
+ "event"
23113
+ ],
23114
+ anchorDefault: "person",
23115
+ shareUnit: "addresses",
23116
+ safetyDefault: "ask"
22965
23117
  },
22966
23118
  {
22967
23119
  code: "191-013-000-000-000-000-000",
@@ -22970,7 +23122,15 @@ var locationType_v1_0_0_default = {
22970
23122
  selectable: true,
22971
23123
  parentCode: null,
22972
23124
  childCodes: [],
22973
- definition: "Location associated with an incident (e.g., where an event occurred, was reported, or was investigated), distinct from current residence, jurisdiction/routing, or service delivery context."
23125
+ definition: "Location associated with an incident (e.g., where an event occurred, was reported, or was investigated), distinct from current residence, jurisdiction/routing, or service delivery context.",
23126
+ tier: "encounter",
23127
+ anchors: [
23128
+ "session",
23129
+ "event"
23130
+ ],
23131
+ anchorDefault: "event",
23132
+ shareUnit: "encounter_location",
23133
+ safetyDefault: "ask"
22974
23134
  }
22975
23135
  ]
22976
23136
  };
@@ -38625,8 +38785,8 @@ var coreInformationScope_v1_0_0_default = {
38625
38785
  domain: "core_information_scope",
38626
38786
  name: "Core Information Scope",
38627
38787
  version: "1.0.0",
38628
- _status: "DRAFT: canonical number 236, self-declared by the source YAML (`cvc_id: CVC-236`); CVC_INDEX.md carries no row for it yet, so the drift gate classifies it INDEX_ABSENT. Sourced from canonical CVC-236 `core_information_scope` v2 (authored 2026-08-13, restructured 2026-08-14): 12 categories / 54 units. TWO GRAINS, deliberately modelled as hierarchy: L1 categories are the POLICY grain and are NOT selectable; L2 units are the AUTHORIZATION grain and are what an ROI or a share actually authorizes. This is the axis the sibling `roi_scope` domain deliberately omits \u2014 `roi_scope` is the flat item vocabulary, and its 27 substantive keys are a strict SUBSET of the 54 units here, with no renames and no collisions. That subset relationship is what makes adopting this domain additive: every stored ROI keeps its exact recorded meaning. `safe_locations` is PROVISIONAL and may be re-keyed by the Notion steward batch \u2014 pin the id with the product owner before any consumer treats it as stable. PENDING canonical Notion authoring + steward ratification.",
38629
- _source: "htilabstech/prototype data/cvcs/core_information_scope.yaml (CVC-236 v2, restructured 2026-08-14)",
38788
+ _status: "DRAFT: canonical number 236, self-declared by the source YAML (`cvc_id: CVC-236`); CVC_INDEX.md carries no row for it yet, so the drift gate classifies it INDEX_ABSENT. Sourced from canonical CVC-236 `core_information_scope` v2 (authored 2026-08-13, restructured 2026-08-14): 12 categories / 56 units. TWO GRAINS, deliberately modelled as hierarchy: L1 categories are the POLICY grain and are NOT selectable; L2 units are the AUTHORIZATION grain and are what an ROI or a share actually authorizes. This is the axis the sibling `roi_scope` domain deliberately omits \u2014 `roi_scope` is the flat item vocabulary, and its 27 substantive keys are a strict SUBSET of the 56 units here, with no renames and no collisions. That subset relationship is what makes adopting this domain additive: every stored ROI keeps its exact recorded meaning. `safe_locations` is PROVISIONAL and may be re-keyed by the Notion steward batch \u2014 pin the id with the product owner before any consumer treats it as stable. PENDING canonical Notion authoring + steward ratification.",
38789
+ _source: "htilabstech/prototype/data/cvcs/core_information_scope.yaml @ 55088d44 (CVC-236 v2, restructured 2026-08-14, amended 2026-10-01; read from origin/main; structural columns cross-checked against htilabstech/prototype/Final CVCs/System Roles, Permissions, & Account Management (IC-66)/core-information_scope \u2014 codebook.csv @ 55088d44)",
38630
38790
  levels: {
38631
38791
  "0": "Unknown or Missing",
38632
38792
  "1": "Category (policy grain, not selectable)",
@@ -38737,7 +38897,7 @@ var coreInformationScope_v1_0_0_default = {
38737
38897
  selectable: true,
38738
38898
  parentCode: "236-001-000-000-000-000-000",
38739
38899
  childCodes: [],
38740
- definition: "Addresses. Category `identifying`.",
38900
+ definition: "Addresses. Category `identifying`. LOCATION-TYPE-LOGIC 2026-10-01 (Crysta R1/R3): routed at TYPE grain since this date \u2014 the location entries whose CVC-191 reason declares share_unit addresses (the residence tier: current / prior residence \xB7 birthplace; the survivor's own whereabouts: current client/victim location \xB7 jurisdiction / routing \xB7 work / school / business \xB7 travel stop \xB7 other), each delivered with its type label. Where we met / where it happened rides encounter_location; trafficking-event locations ride victimization; legal locations ride system_involvement; the agency's own site rides nothing. The `address` assertion_domain stays mapped here for the viewing axis and the ADDRESS_* audit verbs.",
38741
38901
  levelFloor: 3,
38742
38902
  appRelevance: [
38743
38903
  "PAVE",
@@ -39093,9 +39253,11 @@ var coreInformationScope_v1_0_0_default = {
39093
39253
  parentCode: null,
39094
39254
  childCodes: [
39095
39255
  "236-003-001-000-000-000-000",
39096
- "236-003-002-000-000-000-000"
39256
+ "236-003-002-000-000-000-000",
39257
+ "236-003-003-000-000-000-000",
39258
+ "236-003-004-000-000-000-000"
39097
39259
  ],
39098
- definition: "Contact & safety \u2014 policy-grain category. Units under it are the authorization grain. NARROWED 2026-08-14 (restructure ruling 2): contact/service history moved to the NEW services category. SUPERSEDES the 2026-08-13 deliberate-merge note; legacy `contact` grants resolve via the alias layer (CVC-69 precedent). LEADS flag dropped (no LEADS units \u2014 was an empty shell).",
39260
+ definition: "Contact & safety \u2014 policy-grain category. Units under it are the authorization grain. NARROWED 2026-08-14 (restructure ruling 2): contact/service history moved to the NEW services category. SUPERSEDES the 2026-08-13 deliberate-merge note; legacy `contact` grants resolve via the alias layer (CVC-69 precedent). LEADS flag dropped (no LEADS units \u2014 was an empty shell). | 2026-09-29 (PRIORITIES-SAFETY-SCOPE-UNIT, Crysta R1): third unit priorities_safety \u2014 the immediate-needs triage answers, one disclosure decision. | 2026-10-01 (LOCATION-TYPE-LOGIC, Crysta R2): fourth unit encounter_location \u2014 where we met / where it happened, the session- or event-anchored CVC-191 encounter reasons.",
39099
39261
  levelFloor: 3,
39100
39262
  appRelevance: [
39101
39263
  "PAVE",
@@ -39137,6 +39299,38 @@ var coreInformationScope_v1_0_0_default = {
39137
39299
  specialDataType: "survivor_confidential",
39138
39300
  platformFloor: true
39139
39301
  },
39302
+ {
39303
+ code: "236-003-003-000-000-000-000",
39304
+ key: "priorities_safety",
39305
+ title: "Priorities & Safety (immediate needs triage)",
39306
+ selectable: true,
39307
+ parentCode: "236-003-000-000-000-000-000",
39308
+ childCodes: [],
39309
+ definition: "Priorities & Safety (immediate needs triage). Category `contact`. NEW 2026-09-29 (PRIORITIES-SAFETY-SCOPE-UNIT, Crysta R1): the completed Immediate Priorities / Priorities & Safety triage, authorized as ONE disclosure decision \u2014 Q1 immediate danger + source of the danger + harm-doer nearby + safe place to go \xB7 Q2 health needs \xB7 Q3 interpreter \xB7 Q4 urgent basic needs \xB7 Q5 transportation (method / time / pickup location) \xB7 Q6 emergency shelter \xB7 Q7 dependents at risk \xB7 Q8 other. Instrument-grain unit on the initial_screen / lap precedent (ruling 1, 2026-08-13), homed under Contact & safety because the answers that had no home are safety facts; the service instances the step derives ride services/service_history on their own. Bidirectional Thread Signal \u2194 PAVE mirror on Q1 (GDR \xA7 6.9.7) \u2014 one unit, both apps. domain_map: priorities_safety \u2192 this unit (R3 EXECUTED later the same day, PRIORITIES-SAFETY-RECORD): CVC-159 domain priorities_safety (Level 1) + monolith emitter emitPrioritiesAnswerCAR (one CAR per answered question) + UDD row capture.priorities_safety; production persistence of the answers stays with Nate under RWT-NEW-priorities-safety-record-and-udd-2026-09-29. Minted in the Notion codebook the same day; codebook row re-synced to the record 2026-09-29.",
39310
+ levelFloor: 3,
39311
+ appRelevance: [
39312
+ "PAVE",
39313
+ "Thread"
39314
+ ],
39315
+ shareableDefault: true,
39316
+ specialDataType: "survivor_confidential"
39317
+ },
39318
+ {
39319
+ code: "236-003-004-000-000-000-000",
39320
+ key: "encounter_location",
39321
+ title: "Encounter location (where we met / where it happened)",
39322
+ selectable: true,
39323
+ parentCode: "236-003-000-000-000-000-000",
39324
+ childCodes: [],
39325
+ definition: "Encounter location (where we met / where it happened). Category `contact`. NEW 2026-10-01 (LOCATION-TYPE-LOGIC, Crysta R2): the location entries whose CVC-191 reason is session- or event-anchored \u2014 Meet / contact (the session card's Meetup / Incident role) and Incident \u2014 authorized as ONE disclosure decision, separate from Addresses. Why it exists: the session card's Meetup / Incident location is encounter-scoped (ADDRESS_INTEGRATION_PLAN row 3 \u2014 a meetup point that belongs to no person), so it was never on the survivor's record and never reached a share; Nate's PAVE 2.0 audit found the same hole from the other direction. Homed under Contact & safety on the 2026-09-29 R1 reasoning: where the survivor was found or met is the safety fact the next advocate needs. Routing is read from CVC-191 (`share_unit: encounter_location` on MEET_LOC + INCIDENT), never hand-listed here; the delivered copy carries each entry with its type label and the session it belongs to. The survivor's own current location stays under Addresses; the agency's own site rides nothing. UDD: capture.encounter_location (apps PAVE + Thread, assertion_domain address). Presets: full_collab (ROI) \xB7 Thread service_referral_packet + mandatory_report (derivation for veto, 2026-09-29 shape).",
39326
+ levelFloor: 3,
39327
+ appRelevance: [
39328
+ "PAVE",
39329
+ "Thread"
39330
+ ],
39331
+ shareableDefault: true,
39332
+ specialDataType: "survivor_confidential"
39333
+ },
39140
39334
  {
39141
39335
  code: "236-004-000-000-000-000-000",
39142
39336
  key: "services",
@@ -56356,7 +56550,10 @@ var CVC_197_VALUES = selectableCodes(
56356
56550
  SuggestionSourceKeys,
56357
56551
  SupportStrengthKeys,
56358
56552
  SupportTopicKeys,
56553
+ TEAM_MODEL_NAME,
56359
56554
  THREAD_INVOLVEMENT_ROLES,
56555
+ TeamAppSchema,
56556
+ TeamDirectoryFieldsSchema,
56360
56557
  ThreadStatusKeys,
56361
56558
  ThreadTypeKeys,
56362
56559
  TimeScopeKeys,
@@ -56377,6 +56574,7 @@ var CVC_197_VALUES = selectableCodes(
56377
56574
  actionStepCompletionStatusSot,
56378
56575
  actionStepTypeSot,
56379
56576
  activityTypeSot,
56577
+ addTeamDirectoryFields,
56380
56578
  addressSchema,
56381
56579
  adminRolesSot,
56382
56580
  administeringJurisdictionSot,
@@ -56614,6 +56812,7 @@ var CVC_197_VALUES = selectableCodes(
56614
56812
  suggestionSourceSot,
56615
56813
  supportStrengthSot,
56616
56814
  supportTopicSot,
56815
+ teamDirectorySchemaDefinition,
56617
56816
  threadStatusSot,
56618
56817
  threadTypeSot,
56619
56818
  timeScopeSot,