@htilabs/platform-common-models 0.24.0 → 0.25.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 +65 -0
- package/dist/{index-Dr6GBCoY.d.ts → index-ClTjjJ_S.d.ts} +1 -1
- package/dist/{index-BTqHP4DM.d.cts → index-Pt82NxQg.d.cts} +1 -1
- package/dist/index.cjs +457 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +437 -2
- package/dist/index.js.map +1 -1
- package/dist/information-scope/index.d.cts +3 -350
- package/dist/information-scope/index.d.ts +3 -350
- package/dist/informationScopeResolver-BzYu97DE.d.cts +351 -0
- package/dist/informationScopeResolver-BzYu97DE.d.ts +351 -0
- 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/dist/services/index.d.cts +2 -1
- package/dist/services/index.d.ts +2 -1
- package/dist/sharing-ceiling/index.cjs +497 -0
- package/dist/sharing-ceiling/index.cjs.map +1 -0
- package/dist/sharing-ceiling/index.d.cts +318 -0
- package/dist/sharing-ceiling/index.d.ts +318 -0
- package/dist/sharing-ceiling/index.js +451 -0
- package/dist/sharing-ceiling/index.js.map +1 -0
- package/package.json +7 -1
- package/src/__sot__/README.md +1 -0
- package/src/__sot__/sharingStarter.pin.json +229 -0
- package/src/__tests__/sharing-starter-canon.test.ts +178 -0
- package/src/generated/sharingPlatformStarter.ts +165 -0
- package/src/index.ts +5 -0
- package/src/sharingCeiling/__tests__/sharingCeiling.test.ts +678 -0
- package/src/sharingCeiling/chain.ts +269 -0
- package/src/sharingCeiling/coverage.ts +346 -0
- package/src/sharingCeiling/index.ts +14 -0
- package/src/sharingCeiling/starter.ts +89 -0
- package/dist/{cvcEntry-BqAGctqK.d.cts → cvcEntry-Asg7mxjB.d.cts} +8 -8
- package/dist/{cvcEntry-BqAGctqK.d.ts → cvcEntry-Asg7mxjB.d.ts} +8 -8
package/README.md
CHANGED
|
@@ -16,6 +16,71 @@ Package exports are organized into a public root API and a small number of
|
|
|
16
16
|
dedicated subpaths (`/validation`, `/cvcs`) — consult `package.json` for the
|
|
17
17
|
authoritative `exports` map.
|
|
18
18
|
|
|
19
|
+
## sharing-ceiling / 0.25.0
|
|
20
|
+
|
|
21
|
+
0.25.0 (co-2sx) ships the Inter-Agency Sharing **ceiling** on the CVC-236 v4
|
|
22
|
+
tree at `@htilabs/platform-common-models/sharing-ceiling` (also from the
|
|
23
|
+
root). It is pure and browser-safe: no mongoose, no I/O, no SOT import.
|
|
24
|
+
|
|
25
|
+
What it holds:
|
|
26
|
+
|
|
27
|
+
- `HTI_SHARE_PLATFORM_STARTER` — canon's platform starter: `scopeByPurpose`
|
|
28
|
+
(the platform per-purpose ceiling for the eight core CVC-84 purposes) and
|
|
29
|
+
`counterpartyOverrides` (seeded partner rules). `HTI_SHARE_PLATFORM_PURPOSE_ENABLED`
|
|
30
|
+
— the platform purpose rows' `enabled` flag (`records_request` ships
|
|
31
|
+
disabled). `INFORMATION_SCOPE_FIELD_HOME_ROWS` — the v4 rows canon's field
|
|
32
|
+
placements home at least one field on (`information_scope_v4.fields.csv`).
|
|
33
|
+
All three are generated from canon by `scripts/gen-sharing-starter.py` and
|
|
34
|
+
held equal to it by GATE M. **Canon gap:** the seeded partner rules are
|
|
35
|
+
keyed by demonstration ids (`palomar`, `okcpd`, `legal_aid_ok`) that no
|
|
36
|
+
registry agency carries, so that rung binds on no real data yet.
|
|
37
|
+
- `sharingScopeEditsFromCells(cells)` — folds ONE account's stored ceiling
|
|
38
|
+
cells (keyed agency × `rowKey` × `purpose`) into canon's
|
|
39
|
+
`sharingScopeEdits`. A cell is present or absent (no status): absent falls
|
|
40
|
+
through; `[]` binds; an unstamped, v3-stamped or malformed list reads `[]`.
|
|
41
|
+
- `effectiveCeiling(rowKey, purpose, { edits, starter?, purposeOverrides?, purposeEnabled? })`
|
|
42
|
+
→ `{ allowed, rung, disabled }` — canon's chain: purpose disabled → the
|
|
43
|
+
account's partner rule → the seeded partner rule → the account default
|
|
44
|
+
(`__default__`) → the platform default. **An unknown purpose fails closed**
|
|
45
|
+
(`allowed: []`, rung `none`) — stricter than canon's `|| null`, because all
|
|
46
|
+
eight core purposes have platform rows, so `none` is always a caller error.
|
|
47
|
+
A purpose is disabled by an explicit `purposeOverrides[p] === false`, or by
|
|
48
|
+
a platform row `enabled: false` unless `purposeOverrides[p] === true` (the
|
|
49
|
+
contract of record, data.js clamp 1). `purposeEnabled` is merged OVER the
|
|
50
|
+
platform rows (`null` / `{}` = the platform rows).
|
|
51
|
+
`sharingCeilingRowKey({ external, id })` gives the row key: `__external__`
|
|
52
|
+
for an off-platform recipient, else the partner id.
|
|
53
|
+
- THE coverage rule, `scopeRowWithinCeiling(scope, allowed, code)`: a row is
|
|
54
|
+
within when it or an ancestor is listed, or when every live, non-floor,
|
|
55
|
+
non-System child is within (recursively) — EXCEPT a row with fields homed
|
|
56
|
+
directly on it and no rest row (`instruments`, `commercial_activity`;
|
|
57
|
+
`hasOwnScopeContent`), which is within only when it or an ancestor is
|
|
58
|
+
listed (strict rule 2). A row under a retired ancestor is not live and is
|
|
59
|
+
never within. Its readers: `rowsOverCeiling(scope, declared, allowed)` (the
|
|
60
|
+
send door — what to refuse), `rowsOutsideCeiling(scope, allowed)` (what a
|
|
61
|
+
composer locks), `rowsExpandedByCeiling(scope, allowed)` (own-content rows
|
|
62
|
+
whose pick reads as a pick of their children) and
|
|
63
|
+
`maskSelectionToCeiling(scope, selection, allowed)` (the composer's masked
|
|
64
|
+
list). A property test pins that the door accepts every masked list.
|
|
65
|
+
|
|
66
|
+
What consumers do:
|
|
67
|
+
|
|
68
|
+
1. Read the sending account's cells and fold them once:
|
|
69
|
+
`const edits = sharingScopeEditsFromCells(cells)`.
|
|
70
|
+
2. Per recipient × purpose: `const c = effectiveCeiling(sharingCeilingRowKey(r), purpose, { edits, purposeOverrides })`.
|
|
71
|
+
Pass `purposeEnabled` only to override individual platform purpose rows.
|
|
72
|
+
3. Judge the declared v4 list with the SAME rule everywhere — the composer
|
|
73
|
+
with `rowsOutsideCeiling` / `rowsExpandedByCeiling` /
|
|
74
|
+
`maskSelectionToCeiling`, the server with `rowsOverCeiling` — passing your
|
|
75
|
+
one information-scope resolver as `scope`. `effectiveCeiling` never
|
|
76
|
+
answers `null`; `[]` (a disabled or unknown purpose) lets only System
|
|
77
|
+
metadata through.
|
|
78
|
+
4. Delete local copies of the starter, the chain and the coverage rule.
|
|
79
|
+
|
|
80
|
+
The ceiling is one clamp: the account's Information Scope catalog, the
|
|
81
|
+
safety floor, relationship posture, named policies and partner restrictions
|
|
82
|
+
still apply around it.
|
|
83
|
+
|
|
19
84
|
## authz / 0.24.0 migration
|
|
20
85
|
|
|
21
86
|
0.24.0 (co-p1x) ships the CVC-133 **codebook default bounds** and aligns the
|
|
@@ -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-
|
|
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-Asg7mxjB.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-
|
|
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-Asg7mxjB.cjs';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|