@openvtc/trust-tasks 0.1.0 → 0.2.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/dist/auth/step-up/approve-request/0.1/payload.d.ts +28 -0
- package/dist/auth/step-up/approve-request/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-request/0.1/payload.js.map +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts +31 -0
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.js.map +1 -1
- package/package.json +2 -2
- package/src/_framework/0.2/framework.ts +11 -0
- package/src/acl/grant/0.1/payload.ts +13 -0
- package/src/auth/passkey/login/finish/0.2/payload.ts +44 -0
- package/src/auth/passkey/login/start/0.2/payload.ts +31 -0
- package/src/auth/step-up/approve-request/0.1/payload.ts +28 -0
- package/src/auth/step-up/approve-request/0.2/payload.ts +75 -0
- package/src/auth/step-up/approve-response/0.1/payload.ts +32 -0
- package/src/auth/step-up/approve-response/0.2/payload.ts +79 -0
- package/src/auth/step-up/policy/0.1/payload.ts +45 -0
- package/src/auth/step-up/policy/0.2/payload.ts +45 -0
- package/src/device/_shared/0.2/device-binding.ts +11 -0
- package/src/device/heartbeat/0.2/payload.ts +31 -0
- package/src/device/list/0.2/payload.ts +48 -0
- package/src/device/register/0.1/payload.ts +18 -0
- package/src/device/register/0.2/payload.ts +106 -0
- package/src/device/set-wake/0.1/payload.ts +45 -0
- package/src/device/set-wake/0.2/payload.ts +45 -0
- package/src/device/wipe/0.2/payload.ts +39 -0
- package/src/did-management/did/check-name/0.1/payload.ts +5 -2
- package/src/index.ts +41 -0
- package/src/policy/_shared/0.2/policy.ts +11 -0
- package/src/policy/evaluate/0.2/payload.ts +102 -0
- package/src/policy/list/0.2/payload.ts +24 -0
- package/src/policy/upsert/0.2/payload.ts +31 -0
- package/src/provision/integration/0.2/payload.ts +181 -0
- package/src/push/provision/0.1/payload.ts +37 -0
- package/src/push/provision/0.2/payload.ts +37 -0
- package/src/push/register/0.1/payload.ts +75 -0
- package/src/push/register/0.2/payload.ts +75 -0
- package/src/push/wake/0.1/payload.ts +43 -0
- package/src/push/wake/0.2/payload.ts +43 -0
- package/src/sync/_shared/0.2/sync-event.ts +11 -0
- package/src/sync/event/0.2/payload.ts +219 -0
- package/src/trust-task-error/0.2/payload.ts +55 -0
- package/src/vault/_shared/0.2/consumer-context.ts +11 -0
- package/src/vault/_shared/0.2/sealed-envelope.ts +15 -0
- package/src/vault/_shared/0.2/session-blob.ts +13 -0
- package/src/vault/_shared/0.2/vault-entry.ts +13 -0
- package/src/vault/_shared/0.2/vault-secret.ts +15 -0
- package/src/vault/get/0.2/payload.ts +27 -0
- package/src/vault/list/0.2/payload.ts +85 -0
- package/src/vault/proxy-login/0.2/payload.ts +112 -0
- package/src/vault/release/0.2/payload.ts +105 -0
- package/src/vault/sign-trust-task/0.2/payload.ts +101 -0
- package/src/vault/sync/0.2/payload.ts +35 -0
- package/src/vault/upsert/0.2/payload.ts +161 -0
- package/src/vault/usage/0.2/payload.ts +40 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/list/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each.
|
|
8
|
+
*/
|
|
9
|
+
export type Capability =
|
|
10
|
+
| "vaultRead"
|
|
11
|
+
| "vaultWrite"
|
|
12
|
+
| "proxyLogin"
|
|
13
|
+
| "fillRelease"
|
|
14
|
+
| "policyAdmin"
|
|
15
|
+
| "deviceAdmin"
|
|
16
|
+
| "sign"
|
|
17
|
+
| "keyMint";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* List DeviceBindings known to the maintainer, optionally filtered by consumer kind, capability, status, and last-seen time.
|
|
21
|
+
*/
|
|
22
|
+
export interface DeviceListPayload {
|
|
23
|
+
consumerKindFilter?: "companion" | "service";
|
|
24
|
+
formFactorFilter?: "browser" | "mobile" | "desktop";
|
|
25
|
+
serviceKindFilter?: "mediator" | "aiAgent" | "daemon";
|
|
26
|
+
capabilityFilter?: Capability;
|
|
27
|
+
/**
|
|
28
|
+
* When true, include devices with `disabledAt` set. Default omits disabled.
|
|
29
|
+
*/
|
|
30
|
+
includeDisabled?: boolean;
|
|
31
|
+
includeWiped?: boolean;
|
|
32
|
+
lastSeenSince?: string;
|
|
33
|
+
pageSize?: number;
|
|
34
|
+
cursor?: string;
|
|
35
|
+
ext?: Ext;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
39
|
+
*/
|
|
40
|
+
export interface Ext {
|
|
41
|
+
[k: string]: unknown | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export const TYPE_URI = "https://trusttasks.org/spec/device/list/0.2" as const;
|
|
46
|
+
|
|
47
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
48
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/device/list/0.2#response" as const;
|
|
@@ -26,6 +26,7 @@ export interface DeviceRegisterPayload {
|
|
|
26
26
|
displayName: string;
|
|
27
27
|
platform?: string;
|
|
28
28
|
attestation?: DeviceAttestation;
|
|
29
|
+
keyCustody?: KeyCustody;
|
|
29
30
|
/**
|
|
30
31
|
* X25519 public key (did:key form) the maintainer will use to HPKE-seal sensitive payloads to this device (sealed secrets, session blobs, sync events). REQUIRED — every Companion/Service needs a recipient key.
|
|
31
32
|
*/
|
|
@@ -74,6 +75,23 @@ export interface NitroEnclave {
|
|
|
74
75
|
export interface NoAttestation {
|
|
75
76
|
kind: "none";
|
|
76
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* OPTIONAL. How the device custodies its private keys (tier + algorithms). RECOMMENDED for mobile Companions. Maintainer policy input — see docs/design-notes/mobile-key-custody-profile.md.
|
|
80
|
+
*/
|
|
81
|
+
export interface KeyCustody {
|
|
82
|
+
/**
|
|
83
|
+
* `hardware`: the key is non-exportable in the secure keystore (iOS Secure Enclave / Android StrongBox) and every signing / key-agreement operation runs in-chip — achievable only with P-256. `software`: the key is held in app memory during use, stored hardware-wrapped at rest. Maintainers MAY apply stricter policy (shorter sessions, more frequent step-up) to `software`-tier devices.
|
|
84
|
+
*/
|
|
85
|
+
tier: "hardware" | "software";
|
|
86
|
+
/**
|
|
87
|
+
* JOSE `alg` of the holder's signing key, e.g. `ES256` (hardware-custodiable on mobile) or `EdDSA` (not).
|
|
88
|
+
*/
|
|
89
|
+
signingAlg?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Curve of the holder's keyAgreement key, e.g. `P-256` (hardware-custodiable on mobile) or `X25519` (not).
|
|
92
|
+
*/
|
|
93
|
+
keyAgreementCurve?: string;
|
|
94
|
+
}
|
|
77
95
|
/**
|
|
78
96
|
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
79
97
|
*/
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/register/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Discriminator: is this consumer a user-driven Companion or a headless Service?
|
|
8
|
+
*/
|
|
9
|
+
export type ConsumerKind = Companion | Service;
|
|
10
|
+
/**
|
|
11
|
+
* Producer-supplied attestation at registration time, verifiable by the maintainer against the platform's attestation infrastructure. Tagged union over the discriminator `kind`.
|
|
12
|
+
*/
|
|
13
|
+
export type DeviceAttestation =
|
|
14
|
+
| WebAuthnAttestation
|
|
15
|
+
| AppleAppAttest
|
|
16
|
+
| PlayIntegrity
|
|
17
|
+
| Tpm
|
|
18
|
+
| NitroEnclave
|
|
19
|
+
| NoAttestation;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Public discovery surface that wraps the maintainer's existing two-phase enrolment (provision-integration → acl/swap-key). A new Companion or Service hands the maintainer its long-term VTA-derived key, its consumer kind, display name, and an optional device attestation; the maintainer creates the DeviceBinding and returns it. Phase 1 (provision-integration) is assumed to have already happened — this task is the post-bootstrap claim step.
|
|
23
|
+
*/
|
|
24
|
+
export interface DeviceRegisterPayload {
|
|
25
|
+
consumerKind: ConsumerKind;
|
|
26
|
+
displayName: string;
|
|
27
|
+
platform?: string;
|
|
28
|
+
attestation?: DeviceAttestation;
|
|
29
|
+
keyCustody?: KeyCustody;
|
|
30
|
+
/**
|
|
31
|
+
* X25519 public key (did:key form) the maintainer will use to HPKE-seal sensitive payloads to this device (sealed secrets, session blobs, sync events). REQUIRED — every Companion/Service needs a recipient key.
|
|
32
|
+
*/
|
|
33
|
+
hpkePublicKey?: string;
|
|
34
|
+
ext?: Ext;
|
|
35
|
+
}
|
|
36
|
+
export interface Companion {
|
|
37
|
+
kind: "companion";
|
|
38
|
+
formFactor: "browser" | "mobile" | "desktop";
|
|
39
|
+
}
|
|
40
|
+
export interface Service {
|
|
41
|
+
kind: "service";
|
|
42
|
+
serviceKind: "mediator" | "aiAgent" | "daemon";
|
|
43
|
+
}
|
|
44
|
+
export interface WebAuthnAttestation {
|
|
45
|
+
kind: "webauthn";
|
|
46
|
+
/**
|
|
47
|
+
* WebAuthn Authenticator AAGUID (UUID).
|
|
48
|
+
*/
|
|
49
|
+
aaguid: string;
|
|
50
|
+
/**
|
|
51
|
+
* Base64url-encoded WebAuthn attestation statement, when supplied by the platform.
|
|
52
|
+
*/
|
|
53
|
+
attestationStatement?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface AppleAppAttest {
|
|
56
|
+
kind: "appleAppAttest";
|
|
57
|
+
keyId: string;
|
|
58
|
+
attestation: string;
|
|
59
|
+
}
|
|
60
|
+
export interface PlayIntegrity {
|
|
61
|
+
kind: "playIntegrity";
|
|
62
|
+
token: string;
|
|
63
|
+
}
|
|
64
|
+
export interface Tpm {
|
|
65
|
+
kind: "tpm";
|
|
66
|
+
quote: string;
|
|
67
|
+
}
|
|
68
|
+
export interface NitroEnclave {
|
|
69
|
+
kind: "nitroEnclave";
|
|
70
|
+
quote: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* No device-level attestation is available. Maintainers MAY still register the device but SHOULD apply stricter policy (shorter session TTL, more frequent step-up).
|
|
74
|
+
*/
|
|
75
|
+
export interface NoAttestation {
|
|
76
|
+
kind: "none";
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* OPTIONAL. How the device custodies its private keys (tier + algorithms). RECOMMENDED for mobile Companions. Maintainer policy input — see docs/design-notes/mobile-key-custody-profile.md.
|
|
80
|
+
*/
|
|
81
|
+
export interface KeyCustody {
|
|
82
|
+
/**
|
|
83
|
+
* `hardware`: the key is non-exportable in the secure keystore (iOS Secure Enclave / Android StrongBox) and every signing / key-agreement operation runs in-chip — achievable only with P-256. `software`: the key is held in app memory during use, stored hardware-wrapped at rest. Maintainers MAY apply stricter policy (shorter sessions, more frequent step-up) to `software`-tier devices.
|
|
84
|
+
*/
|
|
85
|
+
tier: "hardware" | "software";
|
|
86
|
+
/**
|
|
87
|
+
* JOSE `alg` of the holder's signing key, e.g. `ES256` (hardware-custodiable on mobile) or `EdDSA` (not).
|
|
88
|
+
*/
|
|
89
|
+
signingAlg?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Curve of the holder's keyAgreement key, e.g. `P-256` (hardware-custodiable on mobile) or `X25519` (not).
|
|
92
|
+
*/
|
|
93
|
+
keyAgreementCurve?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
97
|
+
*/
|
|
98
|
+
export interface Ext {
|
|
99
|
+
[k: string]: unknown | undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Trust Task type URI. */
|
|
103
|
+
export const TYPE_URI = "https://trusttasks.org/spec/device/register/0.2" as const;
|
|
104
|
+
|
|
105
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
106
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/device/register/0.2#response" as const;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/set-wake/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A device conveys to its VTA the opaque WakeHandle it obtained from a push gateway, so the VTA can own the trigger allowlist and provision the gateway. Carries no platform push token — only the handle. Present `wakeHandle` sets/replaces the wake channel; absent clears it (device becomes non-wakeable). Idempotent; re-issued on token rotation. See the push wake-up binding (https://trusttasks.org/binding/push/0.1).
|
|
8
|
+
*/
|
|
9
|
+
export interface DeviceSetWakePayload {
|
|
10
|
+
wakeHandle?: WakeHandle;
|
|
11
|
+
/**
|
|
12
|
+
* OPTIONAL, advisory. The abstract platform behind the handle, for device/list visibility only. The VTA never sees the token; this is a non-authoritative hint.
|
|
13
|
+
*/
|
|
14
|
+
pushPlatform?: "apns" | "fcm" | "webpush";
|
|
15
|
+
/**
|
|
16
|
+
* OPTIONAL, advisory. DIDs the device suggests as wake triggers (e.g. its mediator). The VTA owns the allowlist and MAY ignore this entirely — it is a hint, not an instruction.
|
|
17
|
+
*/
|
|
18
|
+
suggestedTriggers?: string[];
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* OPTIONAL. The opaque gateway-issued handle for this device's push channel. Omit to clear the wake channel (the VTA empties the gateway allowlist; the device becomes non-wakeable).
|
|
23
|
+
*/
|
|
24
|
+
export interface WakeHandle {
|
|
25
|
+
/**
|
|
26
|
+
* The push gateway that issued this handle and acts on it — a DID (DIDComm-reachable gateway) or an https URL (REST gateway). A trigger sends its contentless wake request here.
|
|
27
|
+
*/
|
|
28
|
+
gateway: string;
|
|
29
|
+
/**
|
|
30
|
+
* Opaque gateway-issued identifier for the device's push channel. Reveals no platform token. Rotates whenever the device re-registers a new platform token with the gateway; the device then re-conveys the fresh handle via device/set-wake.
|
|
31
|
+
*/
|
|
32
|
+
handle: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
36
|
+
*/
|
|
37
|
+
export interface Ext {
|
|
38
|
+
[k: string]: unknown | undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Trust Task type URI. */
|
|
42
|
+
export const TYPE_URI = "https://trusttasks.org/spec/device/set-wake/0.1" as const;
|
|
43
|
+
|
|
44
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
45
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/device/set-wake/0.1#response" as const;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/set-wake/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A device conveys to its VTA the opaque WakeHandle it obtained from a push gateway, so the VTA can own the trigger allowlist and provision the gateway. Carries no platform push token — only the handle. Present `wakeHandle` sets/replaces the wake channel; absent clears it (device becomes non-wakeable). Idempotent; re-issued on token rotation. See the push wake-up binding (https://trusttasks.org/binding/push/0.1).
|
|
8
|
+
*/
|
|
9
|
+
export interface DeviceSetWakePayload {
|
|
10
|
+
wakeHandle?: WakeHandle;
|
|
11
|
+
/**
|
|
12
|
+
* OPTIONAL, advisory. The abstract platform behind the handle, for device/list visibility only. The VTA never sees the token; this is a non-authoritative hint.
|
|
13
|
+
*/
|
|
14
|
+
pushPlatform?: "apns" | "fcm" | "webpush";
|
|
15
|
+
/**
|
|
16
|
+
* OPTIONAL, advisory. DIDs the device suggests as wake triggers (e.g. its mediator). The VTA owns the allowlist and MAY ignore this entirely — it is a hint, not an instruction.
|
|
17
|
+
*/
|
|
18
|
+
suggestedTriggers?: string[];
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* OPTIONAL. The opaque gateway-issued handle for this device's push channel. Omit to clear the wake channel (the VTA empties the gateway allowlist; the device becomes non-wakeable).
|
|
23
|
+
*/
|
|
24
|
+
export interface WakeHandle {
|
|
25
|
+
/**
|
|
26
|
+
* The push gateway that issued this handle and acts on it — a DID (DIDComm-reachable gateway) or an https URL (REST gateway). A trigger sends its contentless wake request here.
|
|
27
|
+
*/
|
|
28
|
+
gateway: string;
|
|
29
|
+
/**
|
|
30
|
+
* Opaque gateway-issued identifier for the device's push channel. Reveals no platform token. Rotates whenever the device re-registers a new platform token with the gateway; the device then re-conveys the fresh handle via device/set-wake.
|
|
31
|
+
*/
|
|
32
|
+
handle: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
36
|
+
*/
|
|
37
|
+
export interface Ext {
|
|
38
|
+
[k: string]: unknown | undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Trust Task type URI. */
|
|
42
|
+
export const TYPE_URI = "https://trusttasks.org/spec/device/set-wake/0.2" as const;
|
|
43
|
+
|
|
44
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
45
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/device/set-wake/0.2#response" as const;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/wipe/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The maintainer issues a wipe to a Companion or Service. The target is expected to destroy its local cache and (depending on scope) its device-local key material. The action is best-effort — a compromised device may silently drop the wipe — so the maintainer additionally revokes ACL access and rotates the device's cache-key derivation root, so that defence in depth means a non-compliant device is still neutralised.
|
|
8
|
+
*/
|
|
9
|
+
export interface DeviceWipePayload {
|
|
10
|
+
deviceId: string;
|
|
11
|
+
/**
|
|
12
|
+
* How aggressively the target should wipe:
|
|
13
|
+
* - `cache` — discard the encrypted vault cache; consumer can re-sync with valid creds.
|
|
14
|
+
* - `cacheAndKeys` — discard cache + device-local key material; consumer must re-onboard.
|
|
15
|
+
* - `full` — `cacheAndKeys` + clear all extension/app storage + revoke OS credential-provider registration where APIs permit.
|
|
16
|
+
*/
|
|
17
|
+
scope: "cache" | "cacheAndKeys" | "full";
|
|
18
|
+
/**
|
|
19
|
+
* Human-readable reason. Required (not optional) because every wipe is consequential and the audit log must capture intent.
|
|
20
|
+
*/
|
|
21
|
+
reason: string;
|
|
22
|
+
/**
|
|
23
|
+
* Wipe-issuance timestamp; identical to the document's `issuedAt`, repeated here so the body is self-contained for offline-queued delivery.
|
|
24
|
+
*/
|
|
25
|
+
issuedAt?: string;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
30
|
+
*/
|
|
31
|
+
export interface Ext {
|
|
32
|
+
[k: string]: unknown | undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Trust Task type URI. */
|
|
36
|
+
export const TYPE_URI = "https://trusttasks.org/spec/device/wipe/0.2" as const;
|
|
37
|
+
|
|
38
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
39
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/device/wipe/0.2#response" as const;
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export interface DIDManagementCheckNamePayload {
|
|
7
|
-
path: string;
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
8
|
+
* Local path to test. REQUIRED for an availability probe (`reserve: false`). OPTIONAL when `reserve: true`: omit it to ask the host to auto-assign a fresh, server-generated mnemonic for the reservation.
|
|
9
|
+
*/
|
|
10
|
+
path?: string;
|
|
11
|
+
/**
|
|
12
|
+
* When true and the path is available — or, when `path` is omitted, always — atomically reserve a slot under the caller and return the resulting DidRecord. When `path` is omitted the host generates a fresh unused mnemonic (auto-assign).
|
|
10
13
|
*/
|
|
11
14
|
reserve?: boolean;
|
|
12
15
|
/**
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND. */
|
|
2
2
|
|
|
3
3
|
export * as FrameworkShared from "./_framework/0.1/framework";
|
|
4
|
+
export * as FrameworkShared from "./_framework/0.2/framework";
|
|
4
5
|
export * as AclEntryShared from "./acl/_shared/0.1/acl-entry";
|
|
5
6
|
export * as AclChangeRole_v0_1 from "./acl/change-role/0.1/payload";
|
|
6
7
|
export * as AclGrant_v0_1 from "./acl/grant/0.1/payload";
|
|
@@ -17,21 +18,34 @@ export * as AuthPasskeyEnrollFinish_v0_1 from "./auth/passkey/enroll/finish/0.1/
|
|
|
17
18
|
export * as AuthPasskeyEnrollInvite_v0_1 from "./auth/passkey/enroll/invite/0.1/payload";
|
|
18
19
|
export * as AuthPasskeyEnrollStart_v0_1 from "./auth/passkey/enroll/start/0.1/payload";
|
|
19
20
|
export * as AuthPasskeyLoginFinish_v0_1 from "./auth/passkey/login/finish/0.1/payload";
|
|
21
|
+
export * as AuthPasskeyLoginFinish_v0_2 from "./auth/passkey/login/finish/0.2/payload";
|
|
20
22
|
export * as AuthPasskeyLoginStart_v0_1 from "./auth/passkey/login/start/0.1/payload";
|
|
23
|
+
export * as AuthPasskeyLoginStart_v0_2 from "./auth/passkey/login/start/0.2/payload";
|
|
21
24
|
export * as AuthRefresh_v0_1 from "./auth/refresh/0.1/payload";
|
|
22
25
|
export * as AuthRevokeSession_v0_1 from "./auth/revoke-session/0.1/payload";
|
|
23
26
|
export * as AuthSessionsList_v0_1 from "./auth/sessions/list/0.1/payload";
|
|
24
27
|
export * as AuthStepUpApproveRequest_v0_1 from "./auth/step-up/approve-request/0.1/payload";
|
|
28
|
+
export * as AuthStepUpApproveRequest_v0_2 from "./auth/step-up/approve-request/0.2/payload";
|
|
25
29
|
export * as AuthStepUpApproveResponse_v0_1 from "./auth/step-up/approve-response/0.1/payload";
|
|
30
|
+
export * as AuthStepUpApproveResponse_v0_2 from "./auth/step-up/approve-response/0.2/payload";
|
|
31
|
+
export * as AuthStepUpPolicy_v0_1 from "./auth/step-up/policy/0.1/payload";
|
|
32
|
+
export * as AuthStepUpPolicy_v0_2 from "./auth/step-up/policy/0.2/payload";
|
|
26
33
|
export * as AuthWhoami_v0_1 from "./auth/whoami/0.1/payload";
|
|
27
34
|
export * as ConfirmRequest_v0_1 from "./confirm/request/0.1/payload";
|
|
28
35
|
export * as ConfirmResponse_v0_1 from "./confirm/response/0.1/payload";
|
|
29
36
|
export * as DeviceBindingShared from "./device/_shared/0.1/device-binding";
|
|
37
|
+
export * as DeviceBindingShared from "./device/_shared/0.2/device-binding";
|
|
30
38
|
export * as DeviceDisable_v0_1 from "./device/disable/0.1/payload";
|
|
31
39
|
export * as DeviceHeartbeat_v0_1 from "./device/heartbeat/0.1/payload";
|
|
40
|
+
export * as DeviceHeartbeat_v0_2 from "./device/heartbeat/0.2/payload";
|
|
32
41
|
export * as DeviceList_v0_1 from "./device/list/0.1/payload";
|
|
42
|
+
export * as DeviceList_v0_2 from "./device/list/0.2/payload";
|
|
33
43
|
export * as DeviceRegister_v0_1 from "./device/register/0.1/payload";
|
|
44
|
+
export * as DeviceRegister_v0_2 from "./device/register/0.2/payload";
|
|
45
|
+
export * as DeviceSetWake_v0_1 from "./device/set-wake/0.1/payload";
|
|
46
|
+
export * as DeviceSetWake_v0_2 from "./device/set-wake/0.2/payload";
|
|
34
47
|
export * as DeviceWipe_v0_1 from "./device/wipe/0.1/payload";
|
|
48
|
+
export * as DeviceWipe_v0_2 from "./device/wipe/0.2/payload";
|
|
35
49
|
export * as WebvhShared from "./did-management/_shared/0.1/did-method-extensions/webvh";
|
|
36
50
|
export * as DidRecordShared from "./did-management/_shared/0.1/did-record";
|
|
37
51
|
export * as DomainEntryShared from "./did-management/_shared/0.1/domain-entry";
|
|
@@ -62,29 +76,56 @@ export * as DidManagementServerHealth_v0_1 from "./did-management/server/health/
|
|
|
62
76
|
export * as DidManagementServerRegister_v0_1 from "./did-management/server/register/0.1/payload";
|
|
63
77
|
export * as DidManagementServerStatsSync_v0_1 from "./did-management/server/stats-sync/0.1/payload";
|
|
64
78
|
export * as PolicyShared from "./policy/_shared/0.1/policy";
|
|
79
|
+
export * as PolicyShared from "./policy/_shared/0.2/policy";
|
|
65
80
|
export * as PolicyDelete_v0_1 from "./policy/delete/0.1/payload";
|
|
66
81
|
export * as PolicyEvaluate_v0_1 from "./policy/evaluate/0.1/payload";
|
|
82
|
+
export * as PolicyEvaluate_v0_2 from "./policy/evaluate/0.2/payload";
|
|
67
83
|
export * as PolicyList_v0_1 from "./policy/list/0.1/payload";
|
|
84
|
+
export * as PolicyList_v0_2 from "./policy/list/0.2/payload";
|
|
68
85
|
export * as PolicyUpsert_v0_1 from "./policy/upsert/0.1/payload";
|
|
86
|
+
export * as PolicyUpsert_v0_2 from "./policy/upsert/0.2/payload";
|
|
69
87
|
export * as ProvisionIntegration_v0_1 from "./provision/integration/0.1/payload";
|
|
88
|
+
export * as ProvisionIntegration_v0_2 from "./provision/integration/0.2/payload";
|
|
89
|
+
export * as PushProvision_v0_1 from "./push/provision/0.1/payload";
|
|
90
|
+
export * as PushProvision_v0_2 from "./push/provision/0.2/payload";
|
|
91
|
+
export * as PushRegister_v0_1 from "./push/register/0.1/payload";
|
|
92
|
+
export * as PushRegister_v0_2 from "./push/register/0.2/payload";
|
|
93
|
+
export * as PushWake_v0_1 from "./push/wake/0.1/payload";
|
|
94
|
+
export * as PushWake_v0_2 from "./push/wake/0.2/payload";
|
|
70
95
|
export * as SyncEventShared from "./sync/_shared/0.1/sync-event";
|
|
96
|
+
export * as SyncEventShared from "./sync/_shared/0.2/sync-event";
|
|
71
97
|
export * as SyncEvent_v0_1 from "./sync/event/0.1/payload";
|
|
98
|
+
export * as SyncEvent_v0_2 from "./sync/event/0.2/payload";
|
|
72
99
|
export * as TrustTaskDiscovery_v0_1 from "./trust-task-discovery/0.1/payload";
|
|
73
100
|
export * as TrustTaskError_v0_1 from "./trust-task-error/0.1/payload";
|
|
101
|
+
export * as TrustTaskError_v0_2 from "./trust-task-error/0.2/payload";
|
|
74
102
|
export * as ConsumerContextShared from "./vault/_shared/0.1/consumer-context";
|
|
75
103
|
export * as SealedEnvelopeShared from "./vault/_shared/0.1/sealed-envelope";
|
|
76
104
|
export * as SessionBlobShared from "./vault/_shared/0.1/session-blob";
|
|
77
105
|
export * as VaultEntryShared from "./vault/_shared/0.1/vault-entry";
|
|
78
106
|
export * as VaultSecretShared from "./vault/_shared/0.1/vault-secret";
|
|
107
|
+
export * as ConsumerContextShared from "./vault/_shared/0.2/consumer-context";
|
|
108
|
+
export * as SealedEnvelopeShared from "./vault/_shared/0.2/sealed-envelope";
|
|
109
|
+
export * as SessionBlobShared from "./vault/_shared/0.2/session-blob";
|
|
110
|
+
export * as VaultEntryShared from "./vault/_shared/0.2/vault-entry";
|
|
111
|
+
export * as VaultSecretShared from "./vault/_shared/0.2/vault-secret";
|
|
79
112
|
export * as VaultDelete_v0_1 from "./vault/delete/0.1/payload";
|
|
80
113
|
export * as VaultGet_v0_1 from "./vault/get/0.1/payload";
|
|
114
|
+
export * as VaultGet_v0_2 from "./vault/get/0.2/payload";
|
|
81
115
|
export * as VaultList_v0_1 from "./vault/list/0.1/payload";
|
|
116
|
+
export * as VaultList_v0_2 from "./vault/list/0.2/payload";
|
|
82
117
|
export * as VaultProxyLogin_v0_1 from "./vault/proxy-login/0.1/payload";
|
|
118
|
+
export * as VaultProxyLogin_v0_2 from "./vault/proxy-login/0.2/payload";
|
|
83
119
|
export * as VaultRelease_v0_1 from "./vault/release/0.1/payload";
|
|
120
|
+
export * as VaultRelease_v0_2 from "./vault/release/0.2/payload";
|
|
84
121
|
export * as VaultSignTrustTask_v0_1 from "./vault/sign-trust-task/0.1/payload";
|
|
122
|
+
export * as VaultSignTrustTask_v0_2 from "./vault/sign-trust-task/0.2/payload";
|
|
85
123
|
export * as VaultSync_v0_1 from "./vault/sync/0.1/payload";
|
|
124
|
+
export * as VaultSync_v0_2 from "./vault/sync/0.2/payload";
|
|
86
125
|
export * as VaultUpsert_v0_1 from "./vault/upsert/0.1/payload";
|
|
126
|
+
export * as VaultUpsert_v0_2 from "./vault/upsert/0.2/payload";
|
|
87
127
|
export * as VaultUsage_v0_1 from "./vault/usage/0.1/payload";
|
|
128
|
+
export * as VaultUsage_v0_2 from "./vault/usage/0.2/payload";
|
|
88
129
|
export * as WebvhSyncDelete_v0_1 from "./webvh/sync/delete/0.1/payload";
|
|
89
130
|
export * as WebvhSyncUpdate_v0_1 from "./webvh/sync/update/0.1/payload";
|
|
90
131
|
export * as WebvhWitnessPublish_v0_1 from "./webvh/witness/publish/0.1/payload";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/policy/_shared/0.2/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 proxy_login vs fill, release vs deny, and step-up demands. 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.
|
|
8
|
+
*/
|
|
9
|
+
export interface PolicySharedDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/policy/evaluate/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A single binding target for a vault entry. Tagged union over the discriminator `kind`. A VaultEntry's `targets` array MAY mix any number of these.
|
|
8
|
+
*/
|
|
9
|
+
export type SiteTarget = WebOrigin | Did | IosApp | AndroidApp;
|
|
10
|
+
/**
|
|
11
|
+
* Discriminator: is this consumer a user-driven Companion or a headless Service?
|
|
12
|
+
*/
|
|
13
|
+
export type ConsumerKind = Companion | Service;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*/
|
|
18
|
+
export interface PolicyEvaluatePayload {
|
|
19
|
+
input: PolicyInput;
|
|
20
|
+
/**
|
|
21
|
+
* Optional — when supplied, evaluate as if this Rego source were active (e.g. preview a pending upsert). The candidate is layered into the evaluator at the priority specified by `candidatePriority` (default 1000) for this call only.
|
|
22
|
+
*/
|
|
23
|
+
candidateModule?: string;
|
|
24
|
+
candidatePriority?: number;
|
|
25
|
+
includeTrace?: boolean;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The structured input fed to a policy evaluator on every vault/proxy-login, vault/release, and policy/evaluate call.
|
|
30
|
+
*/
|
|
31
|
+
export interface PolicyInput {
|
|
32
|
+
request: {
|
|
33
|
+
kind: "proxyLogin" | "release" | "stepUpResponse";
|
|
34
|
+
};
|
|
35
|
+
site: SiteTarget;
|
|
36
|
+
contextId: string;
|
|
37
|
+
consumer: {
|
|
38
|
+
did: string;
|
|
39
|
+
kind?: ConsumerKind;
|
|
40
|
+
deviceId?: string;
|
|
41
|
+
lastUserVerificationAt?: string;
|
|
42
|
+
networkClass?: "unknown" | "home" | "corp" | "public" | "vpn";
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface WebOrigin {
|
|
46
|
+
kind: "webOrigin";
|
|
47
|
+
/**
|
|
48
|
+
* Web origin per RFC 6454 (scheme + host + optional port), e.g. "https://github.com". Compared by exact string equality after canonicalisation (lowercase host, default port elided). Consumers wanting subdomain coverage SHOULD add multiple targets, not encode a wildcard.
|
|
49
|
+
*/
|
|
50
|
+
origin: string;
|
|
51
|
+
}
|
|
52
|
+
export interface Did {
|
|
53
|
+
kind: "did";
|
|
54
|
+
/**
|
|
55
|
+
* DID identifying the relying party (e.g. did:web:rp.example). The vault maintainer is responsible for any DID resolution required to act on this entry.
|
|
56
|
+
*/
|
|
57
|
+
did: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IosApp {
|
|
60
|
+
kind: "iosApp";
|
|
61
|
+
/**
|
|
62
|
+
* iOS bundle identifier in reverse-DNS form (e.g. "com.github.stwalkerster.codehub"). Compared by exact string equality. Matches when an iOS Companion identifies the requesting app via its bundle id (typically via the OS Credential Manager integration).
|
|
63
|
+
*/
|
|
64
|
+
bundleId: string;
|
|
65
|
+
/**
|
|
66
|
+
* Optional Apple Developer Team identifier (10-character alphanumeric). When supplied, the maintainer SHOULD also verify the team id of the requesting app before matching — defense in depth against bundle-id squatting on jailbroken devices.
|
|
67
|
+
*/
|
|
68
|
+
teamId?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface AndroidApp {
|
|
71
|
+
kind: "androidApp";
|
|
72
|
+
/**
|
|
73
|
+
* Android package name in reverse-DNS form (e.g. "com.github.android").
|
|
74
|
+
*/
|
|
75
|
+
packageName: string;
|
|
76
|
+
/**
|
|
77
|
+
* SHA-256 fingerprints of the app's signing certificates, in colon-separated hex (the format `apksigner` and the Play Console emit). At least one fingerprint MUST be present. The maintainer matches when ANY of the provided fingerprints matches the requesting app's signature — this supports apps signed by multiple keys (e.g. during certificate rotation via Play App Signing).
|
|
78
|
+
*
|
|
79
|
+
* @minItems 1
|
|
80
|
+
*/
|
|
81
|
+
sha256CertFingerprints: [string, ...string[]];
|
|
82
|
+
}
|
|
83
|
+
export interface Companion {
|
|
84
|
+
kind: "companion";
|
|
85
|
+
formFactor: "browser" | "mobile" | "desktop";
|
|
86
|
+
}
|
|
87
|
+
export interface Service {
|
|
88
|
+
kind: "service";
|
|
89
|
+
serviceKind: "mediator" | "aiAgent" | "daemon";
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
93
|
+
*/
|
|
94
|
+
export interface Ext {
|
|
95
|
+
[k: string]: unknown | undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Trust Task type URI. */
|
|
99
|
+
export const TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.2" as const;
|
|
100
|
+
|
|
101
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
102
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.2#response" as const;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/policy/list/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface PolicyListPayload {
|
|
7
|
+
contextId?: string;
|
|
8
|
+
enabledOnly?: boolean;
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
cursor?: string;
|
|
11
|
+
ext?: Ext;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
15
|
+
*/
|
|
16
|
+
export interface Ext {
|
|
17
|
+
[k: string]: unknown | undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Trust Task type URI. */
|
|
21
|
+
export const TYPE_URI = "https://trusttasks.org/spec/policy/list/0.2" as const;
|
|
22
|
+
|
|
23
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
24
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/list/0.2#response" as const;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/policy/upsert/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface PolicyUpsertPayload {
|
|
7
|
+
id?: string;
|
|
8
|
+
expectedVersion?: number;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Rego source. The maintainer parses and validates against its evaluator before persisting; a syntactically invalid module is rejected.
|
|
13
|
+
*/
|
|
14
|
+
module: string;
|
|
15
|
+
appliesTo?: string[];
|
|
16
|
+
priority?: number;
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/policy/upsert/0.2" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/upsert/0.2#response" as const;
|