@openvtc/trust-tasks 0.27.9 → 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.
- package/CHANGELOG.md +84 -0
- package/dist/_runtime/codes.d.ts +1 -1
- package/dist/_runtime/codes.d.ts.map +1 -1
- package/dist/_runtime/codes.js +3 -0
- package/dist/_runtime/codes.js.map +1 -1
- package/dist/_runtime/document.d.ts +1 -1
- package/dist/_runtime/document.js +1 -1
- package/dist/_shared/components.d.ts +39 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/policy/_shared/0.4/policy.d.ts +16 -0
- package/dist/policy/_shared/0.4/policy.d.ts.map +1 -0
- package/dist/policy/_shared/0.4/policy.js +6 -0
- package/dist/policy/_shared/0.4/policy.js.map +1 -0
- package/dist/policy/evaluate/0.1/payload.d.ts +4 -4
- package/dist/policy/evaluate/0.1/payload.js +1 -1
- package/dist/policy/evaluate/0.2/payload.d.ts +4 -4
- package/dist/policy/evaluate/0.2/payload.js +1 -1
- package/dist/policy/evaluate/0.3/payload.d.ts +13 -2
- package/dist/policy/evaluate/0.3/payload.d.ts.map +1 -1
- package/dist/policy/evaluate/0.3/payload.js +1 -1
- package/dist/policy/evaluate/0.3/payload.js.map +1 -1
- package/dist/policy/evaluate/0.4/payload.d.ts +1416 -0
- package/dist/policy/evaluate/0.4/payload.d.ts.map +1 -0
- package/dist/policy/evaluate/0.4/payload.js +899 -0
- package/dist/policy/evaluate/0.4/payload.js.map +1 -0
- package/dist/trust-task-error/0.1/payload.d.ts +2 -2
- package/dist/trust-task-error/0.1/payload.js +1 -1
- package/dist/trust-task-error/0.2/payload.d.ts +2 -2
- package/dist/trust-task-error/0.2/payload.js +1 -1
- package/dist/trust-task-error/0.3/payload.d.ts +2 -2
- package/dist/trust-task-error/0.3/payload.js +1 -1
- package/dist/trust-task-error/0.4/payload.d.ts +2 -2
- package/dist/trust-task-error/0.4/payload.js +1 -1
- package/dist/trust-task-error/0.5/payload.d.ts +7 -1
- package/dist/trust-task-error/0.5/payload.d.ts.map +1 -1
- package/dist/trust-task-error/0.5/payload.js +1 -1
- package/dist/trust-task-error/0.5/payload.js.map +1 -1
- package/dist/trust-task-error/0.6/payload.d.ts +199 -0
- package/dist/trust-task-error/0.6/payload.d.ts.map +1 -0
- package/dist/trust-task-error/0.6/payload.js +126 -0
- package/dist/trust-task-error/0.6/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/codes.ts +3 -0
- package/src/_runtime/document.ts +1 -1
- package/src/_shared/components.ts +39 -0
- package/src/index.ts +7 -0
- package/src/policy/_shared/0.4/policy.ts +17 -0
- package/src/policy/evaluate/0.1/payload.ts +5 -5
- package/src/policy/evaluate/0.2/payload.ts +5 -5
- package/src/policy/evaluate/0.3/payload.ts +14 -3
- package/src/policy/evaluate/0.4/payload.ts +944 -0
- package/src/trust-task-error/0.1/payload.ts +3 -3
- package/src/trust-task-error/0.2/payload.ts +3 -3
- package/src/trust-task-error/0.3/payload.ts +3 -3
- package/src/trust-task-error/0.4/payload.ts +3 -3
- package/src/trust-task-error/0.5/payload.ts +8 -2
- package/src/trust-task-error/0.6/payload.ts +195 -0
package/src/index.ts
CHANGED
|
@@ -1444,6 +1444,9 @@ export import PolicyShared_v0_2 = _PolicyShared_v0_2;
|
|
|
1444
1444
|
import * as _PolicyShared_v0_3 from "./policy/_shared/0.3/policy.js";
|
|
1445
1445
|
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
1446
1446
|
export import PolicyShared_v0_3 = _PolicyShared_v0_3;
|
|
1447
|
+
import * as _PolicyShared_v0_4 from "./policy/_shared/0.4/policy.js";
|
|
1448
|
+
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
1449
|
+
export import PolicyShared_v0_4 = _PolicyShared_v0_4;
|
|
1447
1450
|
import * as _PolicyActivate_v0_1 from "./policy/activate/0.1/payload.js";
|
|
1448
1451
|
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
1449
1452
|
export import PolicyActivate_v0_1 = _PolicyActivate_v0_1;
|
|
@@ -1462,6 +1465,9 @@ export import PolicyEvaluate_v0_2 = _PolicyEvaluate_v0_2;
|
|
|
1462
1465
|
import * as _PolicyEvaluate_v0_3 from "./policy/evaluate/0.3/payload.js";
|
|
1463
1466
|
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
1464
1467
|
export import PolicyEvaluate_v0_3 = _PolicyEvaluate_v0_3;
|
|
1468
|
+
import * as _PolicyEvaluate_v0_4 from "./policy/evaluate/0.4/payload.js";
|
|
1469
|
+
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
1470
|
+
export import PolicyEvaluate_v0_4 = _PolicyEvaluate_v0_4;
|
|
1465
1471
|
import * as _PolicyGet_v0_1 from "./policy/get/0.1/payload.js";
|
|
1466
1472
|
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
1467
1473
|
export import PolicyGet_v0_1 = _PolicyGet_v0_1;
|
|
@@ -1904,6 +1910,7 @@ export * as TrustTaskError_v0_2 from "./trust-task-error/0.2/payload.js";
|
|
|
1904
1910
|
export * as TrustTaskError_v0_3 from "./trust-task-error/0.3/payload.js";
|
|
1905
1911
|
export * as TrustTaskError_v0_4 from "./trust-task-error/0.4/payload.js";
|
|
1906
1912
|
export * as TrustTaskError_v0_5 from "./trust-task-error/0.5/payload.js";
|
|
1913
|
+
export * as TrustTaskError_v0_6 from "./trust-task-error/0.6/payload.js";
|
|
1907
1914
|
export * as TrustTaskNextStep_v0_1 from "./trust-task-next-step/0.1/payload.js";
|
|
1908
1915
|
export * as TrustTaskOk_v0_1 from "./trust-task-ok/0.1/payload.js";
|
|
1909
1916
|
import * as _ConsumerContextShared_v0_1 from "./vault/_shared/0.1/consumer-context.js";
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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 =
|
|
58
|
+
export const DEPRECATION: string | null = "superseded by policy/evaluate/0.4";
|
|
56
59
|
|
|
57
|
-
/**
|
|
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
|
-
/**
|
|
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
|
/**
|