@ultimat3/policy 2.0.0 → 3.0.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.
Files changed (2) hide show
  1. package/CLAUDE.md +6 -0
  2. package/package.json +2 -2
package/CLAUDE.md CHANGED
@@ -45,6 +45,12 @@ two differ, and it is why a surface that decides on input alone needs no edit.
45
45
  say it in a type (a config-driven route table, a policy resolved by name). Never default
46
46
  to allow.
47
47
  - `can()` validates its permission at declaration time, not at request time.
48
+ - **`definePermissions()` merges, and an EMPTY registry is permissive.** It only ever `add`s, so a
49
+ package that declares its own names at import time (`@ultimat3/admin`'s policy bridge) cannot
50
+ clobber an app's set. What it does change is the mode: `isKnownPermission` answers `true` to
51
+ everything while nothing is declared, so the first declaration anywhere in the process turns
52
+ strict checking on for everyone. A test that uses `can()` declares the set it uses and restores
53
+ the one it found — never leans on the empty registry.
48
54
  - **`not()` never inverts `X_UNAUTHENTICATED`.** A null actor is not a fact about this
49
55
  actor's grants; inverting it makes `not(can('order:internal'))` a public door into the
50
56
  internal one. Any denial carrying that code propagates unchanged.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/policy",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "The one authz rule, evaluated identically in every surface",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,6 +31,6 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@ultimat3/core": "2.0.0"
34
+ "@ultimat3/core": "3.0.0"
35
35
  }
36
36
  }