@vess-id/ai-identity 0.19.0 → 0.20.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 (32) hide show
  1. package/dist/index.d.mts +2746 -863
  2. package/dist/index.d.ts +4 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +447 -11
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +440 -13
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/registry/__tests__/action-registry-doc-review.spec.d.ts +14 -0
  9. package/dist/registry/__tests__/action-registry-doc-review.spec.d.ts.map +1 -0
  10. package/dist/registry/__tests__/action-risk.spec.d.ts +6 -1
  11. package/dist/registry/__tests__/action-risk.spec.d.ts.map +1 -1
  12. package/dist/registry/__tests__/salient-completeness.spec.d.ts +43 -0
  13. package/dist/registry/__tests__/salient-completeness.spec.d.ts.map +1 -0
  14. package/dist/registry/action-registry-json.d.ts +1801 -176
  15. package/dist/registry/action-registry-json.d.ts.map +1 -1
  16. package/dist/registry/action-registry.d.ts +13 -0
  17. package/dist/registry/action-registry.d.ts.map +1 -1
  18. package/dist/registry/action-risk.d.ts +27 -4
  19. package/dist/registry/action-risk.d.ts.map +1 -1
  20. package/dist/registry/action-summary.d.ts.map +1 -1
  21. package/dist/resolver/approval-time-resolution.d.ts +72 -0
  22. package/dist/resolver/approval-time-resolution.d.ts.map +1 -0
  23. package/dist/resolver/salient-digest.d.ts +48 -0
  24. package/dist/resolver/salient-digest.d.ts.map +1 -0
  25. package/dist/types/grant.d.ts +11 -0
  26. package/dist/types/grant.d.ts.map +1 -1
  27. package/dist/types/permission-vc.d.ts +81 -0
  28. package/dist/types/permission-vc.d.ts.map +1 -1
  29. package/dist/types/vc.d.ts +11 -1
  30. package/dist/types/vc.d.ts.map +1 -1
  31. package/dist/utils/sdjwt-disclosure.d.ts.map +1 -1
  32. package/package.json +3 -3
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Tests for the doc_review.submit_response action in ACTION_REGISTRY.
3
+ *
4
+ * doc_review.submit_response is the response leg of the doc-review A2A task
5
+ * (Phase D). Like scheduling.submit_response it is an internal inbox write
6
+ * (no external OAuth), carries the single nominal base scope `inbox`, and is
7
+ * risk:'high' so it never skips the human-approval leg. Findings are computed
8
+ * LLM-side; the server only validates the shape. Its tool name is auto-derived
9
+ * from the first action segment ('doc_review').
10
+ *
11
+ * Spec: A2A Phase D doc-review design §3.1
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=action-registry-doc-review.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-registry-doc-review.spec.d.ts","sourceRoot":"","sources":["../../../src/registry/__tests__/action-registry-doc-review.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -8,7 +8,12 @@
8
8
  * Phase 1 baseline rule (registry-free, deterministic):
9
9
  * - HIGH_RISK_SUFFIXES → 'high'
10
10
  * - LOW_RISK_SUFFIXES → 'low'
11
- * - everything else → 'medium' (fail-safe default)
11
+ * - everything else → 'high' (fail-CLOSED default, #1285)
12
+ *
13
+ * The default was 'medium' until #1285. That was not fail-safe: the Cedar
14
+ * default policy permits low and medium unconditionally
15
+ * (api/src/grant/services/system-policy.service.ts:105), so an unregistered
16
+ * action landed on the permit side AND skipped Gate-2 resource pinning.
12
17
  *
13
18
  * Classification is based on the **last dotted segment** of the action
14
19
  * name (case-insensitive).
@@ -1 +1 @@
1
- {"version":3,"file":"action-risk.spec.d.ts","sourceRoot":"","sources":["../../../src/registry/__tests__/action-risk.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"action-risk.spec.d.ts","sourceRoot":"","sources":["../../../src/registry/__tests__/action-risk.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Salient-field completeness test (P1 / #1205, Step 2).
3
+ *
4
+ * The decision-bound authorization design (docs/proposals/1205-P1-...) binds a
5
+ * hash of the approval-critical ("salient") parameters into the signed VC. The
6
+ * PEP later refuses to adopt a VC approval whose executed params do not hash to
7
+ * the committed value. For that binding to actually protect an action, the
8
+ * action MUST declare a `approval_salient_fields` set — otherwise the digest is
9
+ * `undefined`, the issuer omits `params_hash`, and the salient gate silently
10
+ * degrades to a no-op (plan §6 "salient set 無しのアクション").
11
+ *
12
+ * The set of actions that go through OOB (out-of-band) human approval is
13
+ * exactly the set of high-risk actions: the approval flow's
14
+ * `validateHighRiskResources` (packages/api/.../narrow-delegates.ts) filters
15
+ * on `risk === 'high' || risk === 'critical'`, and `resolveActionRisk` returns
16
+ * the registry `risk` verbatim. So the predicate here is registry
17
+ * `risk ∈ {high, critical}` — the exact set that mints an OOB approval.
18
+ *
19
+ * This test is the guard the plan (§0.5) relies on to catch the class of bug
20
+ * where a salient field name is a typo that does not exist in the action's
21
+ * input_schema (the plan's own `pr_number` example — the real github field is
22
+ * `pullNumber`). It asserts, for every approval-gated action:
23
+ * 1. a non-empty `approval_salient_fields` is declared;
24
+ * 2. every declared field name exists in `input_schema.properties`;
25
+ * 3. no declared field is typed as a non-integer number (float ban, rule 5);
26
+ * 4. the salient set includes the resource-binding param(s) so it agrees with
27
+ * `canonicalResourceId`'s resource extraction (plan §6: salient ⊇
28
+ * resource-binding);
29
+ * 5. UNDER-INCLUSION heuristic: no input_schema property whose NAME matches a
30
+ * known-dangerous pattern (ownership/targeting or effect/destructiveness
31
+ * flags) is silently OMITTED from the salient set unless it is in an
32
+ * explicit, documented allowlist.
33
+ *
34
+ * Two caveats on the guarantee this file provides:
35
+ * (a) under-inclusion is now HEURISTICALLY guarded (assertion 5), but the
36
+ * heuristic only catches name-pattern matches — human security judgment is
37
+ * still required to decide the substance-of-approval fields for each action;
38
+ * (b) a user/Cedar policy can only REMOVE actions from approval (narrow), never
39
+ * add, so binding the registry high|critical set is a safe SUPERSET of what
40
+ * actually reaches OOB approval.
41
+ */
42
+ export {};
43
+ //# sourceMappingURL=salient-completeness.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salient-completeness.spec.d.ts","sourceRoot":"","sources":["../../../src/registry/__tests__/salient-completeness.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG"}