@openvtc/trust-tasks 0.27.8 → 0.28.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 (77) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +9 -0
  3. package/dist/_runtime/codes.d.ts +22 -3
  4. package/dist/_runtime/codes.d.ts.map +1 -1
  5. package/dist/_runtime/codes.js +26 -19
  6. package/dist/_runtime/codes.js.map +1 -1
  7. package/dist/_runtime/document.d.ts +1 -1
  8. package/dist/_runtime/document.js +1 -1
  9. package/dist/_runtime/extends.d.ts +16 -7
  10. package/dist/_runtime/extends.d.ts.map +1 -1
  11. package/dist/_runtime/extends.js +44 -35
  12. package/dist/_runtime/extends.js.map +1 -1
  13. package/dist/_runtime/index.d.ts +1 -0
  14. package/dist/_runtime/index.d.ts.map +1 -1
  15. package/dist/_runtime/index.js +1 -0
  16. package/dist/_runtime/index.js.map +1 -1
  17. package/dist/_runtime/type-uri.d.ts +96 -0
  18. package/dist/_runtime/type-uri.d.ts.map +1 -0
  19. package/dist/_runtime/type-uri.js +194 -0
  20. package/dist/_runtime/type-uri.js.map +1 -0
  21. package/dist/_shared/components.d.ts +39 -0
  22. package/dist/_shared/components.d.ts.map +1 -1
  23. package/dist/index.d.ts +3778 -1257
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +3778 -1257
  26. package/dist/index.js.map +1 -1
  27. package/dist/policy/_shared/0.4/policy.d.ts +16 -0
  28. package/dist/policy/_shared/0.4/policy.d.ts.map +1 -0
  29. package/dist/policy/_shared/0.4/policy.js +6 -0
  30. package/dist/policy/_shared/0.4/policy.js.map +1 -0
  31. package/dist/policy/evaluate/0.1/payload.d.ts +4 -4
  32. package/dist/policy/evaluate/0.1/payload.js +1 -1
  33. package/dist/policy/evaluate/0.2/payload.d.ts +4 -4
  34. package/dist/policy/evaluate/0.2/payload.js +1 -1
  35. package/dist/policy/evaluate/0.3/payload.d.ts +13 -2
  36. package/dist/policy/evaluate/0.3/payload.d.ts.map +1 -1
  37. package/dist/policy/evaluate/0.3/payload.js +1 -1
  38. package/dist/policy/evaluate/0.3/payload.js.map +1 -1
  39. package/dist/policy/evaluate/0.4/payload.d.ts +1416 -0
  40. package/dist/policy/evaluate/0.4/payload.d.ts.map +1 -0
  41. package/dist/policy/evaluate/0.4/payload.js +899 -0
  42. package/dist/policy/evaluate/0.4/payload.js.map +1 -0
  43. package/dist/trust-task-error/0.1/payload.d.ts +2 -2
  44. package/dist/trust-task-error/0.1/payload.js +1 -1
  45. package/dist/trust-task-error/0.2/payload.d.ts +2 -2
  46. package/dist/trust-task-error/0.2/payload.js +1 -1
  47. package/dist/trust-task-error/0.3/payload.d.ts +2 -2
  48. package/dist/trust-task-error/0.3/payload.js +1 -1
  49. package/dist/trust-task-error/0.4/payload.d.ts +2 -2
  50. package/dist/trust-task-error/0.4/payload.js +1 -1
  51. package/dist/trust-task-error/0.5/payload.d.ts +7 -1
  52. package/dist/trust-task-error/0.5/payload.d.ts.map +1 -1
  53. package/dist/trust-task-error/0.5/payload.js +1 -1
  54. package/dist/trust-task-error/0.5/payload.js.map +1 -1
  55. package/dist/trust-task-error/0.6/payload.d.ts +199 -0
  56. package/dist/trust-task-error/0.6/payload.d.ts.map +1 -0
  57. package/dist/trust-task-error/0.6/payload.js +126 -0
  58. package/dist/trust-task-error/0.6/payload.js.map +1 -0
  59. package/package.json +1 -1
  60. package/src/_runtime/codes.ts +27 -21
  61. package/src/_runtime/document.ts +1 -1
  62. package/src/_runtime/extends.ts +50 -40
  63. package/src/_runtime/index.ts +14 -0
  64. package/src/_runtime/type-uri.ts +252 -0
  65. package/src/_shared/components.ts +39 -0
  66. package/src/index.ts +3778 -1257
  67. package/src/policy/_shared/0.4/policy.ts +17 -0
  68. package/src/policy/evaluate/0.1/payload.ts +5 -5
  69. package/src/policy/evaluate/0.2/payload.ts +5 -5
  70. package/src/policy/evaluate/0.3/payload.ts +14 -3
  71. package/src/policy/evaluate/0.4/payload.ts +944 -0
  72. package/src/trust-task-error/0.1/payload.ts +3 -3
  73. package/src/trust-task-error/0.2/payload.ts +3 -3
  74. package/src/trust-task-error/0.3/payload.ts +3 -3
  75. package/src/trust-task-error/0.4/payload.ts +3 -3
  76. package/src/trust-task-error/0.5/payload.ts +8 -2
  77. package/src/trust-task-error/0.6/payload.ts +195 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/policy/_shared/0.4/policy.schema.json
4
+ */
5
+
6
+ /**
7
+ * Shared Rego policy types referenced by the policy/* spec family. The maintainer evaluates these against PolicyInput (the request context) to decide the disposition of a task. 0.3 generalises PolicyInput from the vault-flow triad (proxy-login / release / step-up) to any Trust Task, carrying the task's Type URI, subject, and the two authoritative SPEC §7.3 classifications (side-effect and exposure) so a policy can gate on what a task does; and adds a `requireConsent` decision so a policy can demand approver-set consent. Engine: embedded Rego via `regorus` (pure-Rust evaluator) in the canonical maintainer implementation; other implementations MAY use a different engine if they accept the same Rego syntax. 0.4 makes `requireConsent.minApprovals` and `requireConsent.excludeRequester` required and drops their defaults (SPEC §6.6 rule 5: a shared component supplies no governance default). 0.3 defaulted them to 1 and false, so a decision that omitted either sent a quorum of one, or let the requester approve itself, with nothing on the wire to show it.
8
+ */
9
+ export interface PolicySharedDefinitions {
10
+ [k: string]: unknown | undefined;
11
+ }
12
+
13
+ /**
14
+ * The definitions this shared schema publishes, hoisted to one declaration each.
15
+ * See "../../../_shared/components.js".
16
+ */
17
+ export type { PolicyDecision_PolicyV0_4 as PolicyDecision, PolicyInput_PolicyV0_3 as PolicyInput } from "../../../_shared/components.js";
@@ -9,7 +9,7 @@ import type { AndroidApp_VaultV0_1 as AndroidApp, Companion_DeviceV0_1 as Compan
9
9
  /**
10
10
  * Dry-run a policy decision against a synthetic PolicyInput. Returns the policy decision plus a trace of which policy modules matched and which rules fired. Used by the policy-editor UI to verify changes before save and by admins to diagnose unexpected deny/allow outcomes.
11
11
  *
12
- * @deprecated superseded by policy/evaluate/0.3
12
+ * @deprecated superseded by policy/evaluate/0.4
13
13
  */
14
14
  export interface PolicyEvaluatePayload {
15
15
  input: PolicyInput;
@@ -21,7 +21,7 @@ export interface PolicyEvaluatePayload {
21
21
  includeTrace?: boolean;
22
22
  ext?: Ext;
23
23
  }
24
- /** @deprecated superseded by policy/evaluate/0.3 */
24
+ /** @deprecated superseded by policy/evaluate/0.4 */
25
25
  export interface PolicyEvaluateResponsePayload {
26
26
  decision: PolicyDecision;
27
27
  /**
@@ -55,12 +55,12 @@ export const EXTENDS: string | null = null;
55
55
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
56
56
  * Versions").
57
57
  */
58
- export const DEPRECATION: string | null = "superseded by policy/evaluate/0.3";
58
+ export const DEPRECATION: string | null = "superseded by policy/evaluate/0.4";
59
59
 
60
60
  /**
61
61
  * Stable alias for this specification's request payload shape.
62
62
  *
63
- * @deprecated superseded by policy/evaluate/0.3
63
+ * @deprecated superseded by policy/evaluate/0.4
64
64
  */
65
65
  export type Payload = PolicyEvaluatePayload;
66
66
 
@@ -70,7 +70,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.
70
70
  /**
71
71
  * Stable alias for this specification's success-response payload shape.
72
72
  *
73
- * @deprecated superseded by policy/evaluate/0.3
73
+ * @deprecated superseded by policy/evaluate/0.4
74
74
  */
75
75
  export type Response = PolicyEvaluateResponsePayload;
76
76
 
@@ -9,7 +9,7 @@ import type { AndroidApp_VaultV0_2 as AndroidApp, Companion_DeviceV0_2 as Compan
9
9
  /**
10
10
  * Dry-run a policy decision against a synthetic PolicyInput. Returns the policy decision plus a trace of which policy modules matched and which rules fired. Used by the policy-editor UI to verify changes before save and by admins to diagnose unexpected deny/allow outcomes.
11
11
  *
12
- * @deprecated superseded by policy/evaluate/0.3
12
+ * @deprecated superseded by policy/evaluate/0.4
13
13
  */
14
14
  export interface PolicyEvaluatePayload {
15
15
  input: PolicyInput;
@@ -21,7 +21,7 @@ export interface PolicyEvaluatePayload {
21
21
  includeTrace?: boolean;
22
22
  ext?: Ext;
23
23
  }
24
- /** @deprecated superseded by policy/evaluate/0.3 */
24
+ /** @deprecated superseded by policy/evaluate/0.4 */
25
25
  export interface PolicyEvaluateResponsePayload {
26
26
  decision: PolicyDecision;
27
27
  /**
@@ -55,12 +55,12 @@ export const EXTENDS: string | null = null;
55
55
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
56
56
  * Versions").
57
57
  */
58
- export const DEPRECATION: string | null = "superseded by policy/evaluate/0.3";
58
+ export const DEPRECATION: string | null = "superseded by policy/evaluate/0.4";
59
59
 
60
60
  /**
61
61
  * Stable alias for this specification's request payload shape.
62
62
  *
63
- * @deprecated superseded by policy/evaluate/0.3
63
+ * @deprecated superseded by policy/evaluate/0.4
64
64
  */
65
65
  export type Payload = PolicyEvaluatePayload;
66
66
 
@@ -70,7 +70,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.
70
70
  /**
71
71
  * Stable alias for this specification's success-response payload shape.
72
72
  *
73
- * @deprecated superseded by policy/evaluate/0.3
73
+ * @deprecated superseded by policy/evaluate/0.4
74
74
  */
75
75
  export type Response = PolicyEvaluateResponsePayload;
76
76
 
@@ -8,6 +8,8 @@ import type { AndroidApp_VaultV0_2 as AndroidApp, Companion_DeviceV0_2 as Compan
8
8
 
9
9
  /**
10
10
  * Dry-run a policy decision against a synthetic PolicyInput. Returns the policy decision plus a trace of which policy modules matched and which rules fired. Used by the policy-editor UI to verify changes before save and by admins to diagnose unexpected outcomes. 0.3 evaluates against the generalised PolicyInput (any Trust Task, carrying typeUri + side-effect/exposure classes) and can return the `requireConsent` decision.
11
+ *
12
+ * @deprecated superseded by policy/evaluate/0.4
11
13
  */
12
14
  export interface PolicyEvaluatePayload {
13
15
  input: PolicyInput;
@@ -19,6 +21,7 @@ export interface PolicyEvaluatePayload {
19
21
  includeTrace?: boolean;
20
22
  ext?: Ext;
21
23
  }
24
+ /** @deprecated superseded by policy/evaluate/0.4 */
22
25
  export interface PolicyEvaluateResponsePayload {
23
26
  decision: PolicyDecision;
24
27
  /**
@@ -52,15 +55,23 @@ export const EXTENDS: string | null = null;
52
55
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
53
56
  * Versions").
54
57
  */
55
- export const DEPRECATION: string | null = null;
58
+ export const DEPRECATION: string | null = "superseded by policy/evaluate/0.4";
56
59
 
57
- /** Stable alias for this specification's request payload shape. */
60
+ /**
61
+ * Stable alias for this specification's request payload shape.
62
+ *
63
+ * @deprecated superseded by policy/evaluate/0.4
64
+ */
58
65
  export type Payload = PolicyEvaluatePayload;
59
66
 
60
67
  /** Trust Task response type URI (request type URI + "#response"). */
61
68
  export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.3#response" as const;
62
69
 
63
- /** Stable alias for this specification's success-response payload shape. */
70
+ /**
71
+ * Stable alias for this specification's success-response payload shape.
72
+ *
73
+ * @deprecated superseded by policy/evaluate/0.4
74
+ */
64
75
  export type Response = PolicyEvaluateResponsePayload;
65
76
 
66
77
  /**