@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.
Files changed (54) hide show
  1. package/dist/auth/step-up/approve-request/0.1/payload.d.ts +28 -0
  2. package/dist/auth/step-up/approve-request/0.1/payload.d.ts.map +1 -1
  3. package/dist/auth/step-up/approve-request/0.1/payload.js.map +1 -1
  4. package/dist/auth/step-up/approve-response/0.1/payload.d.ts +31 -0
  5. package/dist/auth/step-up/approve-response/0.1/payload.d.ts.map +1 -1
  6. package/dist/auth/step-up/approve-response/0.1/payload.js.map +1 -1
  7. package/package.json +2 -2
  8. package/src/_framework/0.2/framework.ts +11 -0
  9. package/src/acl/grant/0.1/payload.ts +13 -0
  10. package/src/auth/passkey/login/finish/0.2/payload.ts +44 -0
  11. package/src/auth/passkey/login/start/0.2/payload.ts +31 -0
  12. package/src/auth/step-up/approve-request/0.1/payload.ts +28 -0
  13. package/src/auth/step-up/approve-request/0.2/payload.ts +75 -0
  14. package/src/auth/step-up/approve-response/0.1/payload.ts +32 -0
  15. package/src/auth/step-up/approve-response/0.2/payload.ts +79 -0
  16. package/src/auth/step-up/policy/0.1/payload.ts +45 -0
  17. package/src/auth/step-up/policy/0.2/payload.ts +45 -0
  18. package/src/device/_shared/0.2/device-binding.ts +11 -0
  19. package/src/device/heartbeat/0.2/payload.ts +31 -0
  20. package/src/device/list/0.2/payload.ts +48 -0
  21. package/src/device/register/0.1/payload.ts +18 -0
  22. package/src/device/register/0.2/payload.ts +106 -0
  23. package/src/device/set-wake/0.1/payload.ts +45 -0
  24. package/src/device/set-wake/0.2/payload.ts +45 -0
  25. package/src/device/wipe/0.2/payload.ts +39 -0
  26. package/src/did-management/did/check-name/0.1/payload.ts +5 -2
  27. package/src/index.ts +41 -0
  28. package/src/policy/_shared/0.2/policy.ts +11 -0
  29. package/src/policy/evaluate/0.2/payload.ts +102 -0
  30. package/src/policy/list/0.2/payload.ts +24 -0
  31. package/src/policy/upsert/0.2/payload.ts +31 -0
  32. package/src/provision/integration/0.2/payload.ts +181 -0
  33. package/src/push/provision/0.1/payload.ts +37 -0
  34. package/src/push/provision/0.2/payload.ts +37 -0
  35. package/src/push/register/0.1/payload.ts +75 -0
  36. package/src/push/register/0.2/payload.ts +75 -0
  37. package/src/push/wake/0.1/payload.ts +43 -0
  38. package/src/push/wake/0.2/payload.ts +43 -0
  39. package/src/sync/_shared/0.2/sync-event.ts +11 -0
  40. package/src/sync/event/0.2/payload.ts +219 -0
  41. package/src/trust-task-error/0.2/payload.ts +55 -0
  42. package/src/vault/_shared/0.2/consumer-context.ts +11 -0
  43. package/src/vault/_shared/0.2/sealed-envelope.ts +15 -0
  44. package/src/vault/_shared/0.2/session-blob.ts +13 -0
  45. package/src/vault/_shared/0.2/vault-entry.ts +13 -0
  46. package/src/vault/_shared/0.2/vault-secret.ts +15 -0
  47. package/src/vault/get/0.2/payload.ts +27 -0
  48. package/src/vault/list/0.2/payload.ts +85 -0
  49. package/src/vault/proxy-login/0.2/payload.ts +112 -0
  50. package/src/vault/release/0.2/payload.ts +105 -0
  51. package/src/vault/sign-trust-task/0.2/payload.ts +101 -0
  52. package/src/vault/sync/0.2/payload.ts +35 -0
  53. package/src/vault/upsert/0.2/payload.ts +161 -0
  54. package/src/vault/usage/0.2/payload.ts +40 -0
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/release/0.2/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Optional — for entries with multiple targets, indicates which one the consumer is acting against. The maintainer's policy may decide release based on the target (e.g. release for web origin allowed, release for iOS app denied).
8
+ */
9
+ export type SiteTarget = WebOrigin | Did | IosApp | AndroidApp;
10
+
11
+ /**
12
+ * Consumer requests that the maintainer release the cleartext secret material of a vault entry. The response carries the secret in a pluggable cipher envelope (see vault/_shared/0.1/sealed-envelope); the cleartext shape is `vault/_shared/0.1/vault-secret#/$defs/VaultSecret`. This is the fallback when proxy-login is not viable (`vault/proxy-login:not_proxyable`) or when the consumer needs the raw secret for a flow the maintainer cannot perform (e.g. autofill into a desktop app, copy-to-clipboard for offline use).
13
+ */
14
+ export interface VaultReleasePayload {
15
+ entryId: string;
16
+ target?: SiteTarget;
17
+ consumerContext?: ConsumerContext;
18
+ stepUpProof?: StepUpProof;
19
+ /**
20
+ * Consumer's requested cache TTL for the released secret. The maintainer MAY cap this; the consumer MUST honour the maintainer's decision.
21
+ */
22
+ ttlSecondsHint?: number;
23
+ ext?: Ext;
24
+ }
25
+ export interface WebOrigin {
26
+ kind: "webOrigin";
27
+ /**
28
+ * 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.
29
+ */
30
+ origin: string;
31
+ }
32
+ export interface Did {
33
+ kind: "did";
34
+ /**
35
+ * 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.
36
+ */
37
+ did: string;
38
+ }
39
+ export interface IosApp {
40
+ kind: "iosApp";
41
+ /**
42
+ * 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).
43
+ */
44
+ bundleId: string;
45
+ /**
46
+ * 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.
47
+ */
48
+ teamId?: string;
49
+ }
50
+ export interface AndroidApp {
51
+ kind: "androidApp";
52
+ /**
53
+ * Android package name in reverse-DNS form (e.g. "com.github.android").
54
+ */
55
+ packageName: string;
56
+ /**
57
+ * 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).
58
+ *
59
+ * @minItems 1
60
+ */
61
+ sha256CertFingerprints: [string, ...string[]];
62
+ }
63
+ /**
64
+ * Caller's situational context — fed to the policy engine.
65
+ */
66
+ export interface ConsumerContext {
67
+ /**
68
+ * Device-binding id assigned at registration. The maintainer cross-checks this against the authenticated transport identity.
69
+ */
70
+ deviceId?: string;
71
+ /**
72
+ * Most recent local user-verification on the consumer device (WebAuthn UV, biometric unlock). The maintainer's policy may require this to be within N seconds.
73
+ */
74
+ lastUserVerificationAt?: string;
75
+ /**
76
+ * Producer-supplied network classification. Advisory.
77
+ */
78
+ networkClass?: "unknown" | "home" | "corp" | "public" | "vpn";
79
+ }
80
+ /**
81
+ * Step-up proof on retry after step_up_required.
82
+ */
83
+ export interface StepUpProof {
84
+ kind: "webauthnUv" | "pushApproval" | "totp";
85
+ /**
86
+ * Format depends on kind: WebAuthn assertion (base64url), DIDComm approval-response message id, or 6–8-digit TOTP code.
87
+ */
88
+ proof: string;
89
+ /**
90
+ * Maintainer-issued challenge id the proof responds to.
91
+ */
92
+ challengeId: string;
93
+ }
94
+ /**
95
+ * 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.
96
+ */
97
+ export interface Ext {
98
+ [k: string]: unknown | undefined;
99
+ }
100
+
101
+ /** Trust Task type URI. */
102
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/release/0.2" as const;
103
+
104
+ /** Trust Task response type URI (request type URI + "#response"). */
105
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/release/0.2#response" as const;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/sign-trust-task/0.2/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Consumer asks the maintainer to attach a Data Integrity proof (eddsa-jcs-2022) to a Trust Task envelope, signing as the principal DID of a `didSelfIssued` or `didcommPeer` vault entry. The long-term signing key never leaves the maintainer. This is the per-envelope signing complement to `vault/proxy-login/0.1`'s session-credential minting: proxy-login mints a session at session-start; sign-trust-task signs individual follow-up tasks during the session.
8
+ */
9
+ export interface VaultSignTrustTaskPayload {
10
+ /**
11
+ * Identifier of the vault entry whose principal will sign. The maintainer rejects with `not_signable` when `entry.secretKind` is not `didSelfIssued` or `didcommPeer` (other kinds have no DID-based signing identity).
12
+ */
13
+ entryId: string;
14
+ unsignedEnvelope: UnsignedTrustTaskEnvelope;
15
+ consumerContext?: ConsumerContext;
16
+ stepUpProof?: StepUpProof;
17
+ ext?: Ext;
18
+ }
19
+ /**
20
+ * The Trust Task document to sign. MUST satisfy the framework's structural requirements (id/type/issuer/recipient/issuedAt/payload). MUST NOT carry a `proof`. `issuer` MUST equal the referenced entry's principalDid — the maintainer refuses to silently rewrite `issuer` (see `envelope_issuer_mismatch`).
21
+ */
22
+ export interface UnsignedTrustTaskEnvelope {
23
+ /**
24
+ * Envelope identifier. Set by the producer of the inner task.
25
+ */
26
+ id: string;
27
+ /**
28
+ * Optional thread/correlation id, per framework §4.x.
29
+ */
30
+ threadId?: string;
31
+ /**
32
+ * Type URI of the inner Trust Task (e.g. `https://trusttasks.org/spec/acl/grant/0.1`).
33
+ */
34
+ type: string;
35
+ /**
36
+ * Issuer DID of the inner task. MUST equal the vault entry's principalDid — the maintainer rejects mismatches with `envelope_issuer_mismatch` rather than overwriting.
37
+ */
38
+ issuer: string;
39
+ /**
40
+ * Recipient DID — the relying party / audience the signed envelope will be delivered to.
41
+ */
42
+ recipient: string;
43
+ /**
44
+ * Producer's wall-clock when the inner task was constructed. Maintainer copies through; the proof's `created` is the maintainer's wall-clock at signing.
45
+ */
46
+ issuedAt: string;
47
+ /**
48
+ * Optional inner-task expiry. The maintainer rejects with `envelope_expired` when this is in the past at sign time.
49
+ */
50
+ expiresAt?: string;
51
+ /**
52
+ * Inner task's payload object. Opaque to the maintainer — passed through unchanged into the signed envelope.
53
+ */
54
+ payload: {
55
+ [k: string]: unknown | undefined;
56
+ };
57
+ ext?: Ext;
58
+ }
59
+ /**
60
+ * 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.
61
+ */
62
+ export interface Ext {
63
+ [k: string]: unknown | undefined;
64
+ }
65
+ /**
66
+ * Caller's situational context — fed to the policy engine.
67
+ */
68
+ export interface ConsumerContext {
69
+ /**
70
+ * Device-binding id assigned at registration. The maintainer cross-checks this against the authenticated transport identity.
71
+ */
72
+ deviceId?: string;
73
+ /**
74
+ * Most recent local user-verification on the consumer device (WebAuthn UV, biometric unlock). The maintainer's policy may require this to be within N seconds.
75
+ */
76
+ lastUserVerificationAt?: string;
77
+ /**
78
+ * Producer-supplied network classification. Advisory.
79
+ */
80
+ networkClass?: "unknown" | "home" | "corp" | "public" | "vpn";
81
+ }
82
+ /**
83
+ * Step-up proof on retry after `stepUpRequired`.
84
+ */
85
+ export interface StepUpProof {
86
+ kind: "webauthnUv" | "pushApproval" | "totp";
87
+ /**
88
+ * Format depends on kind: WebAuthn assertion (base64url), DIDComm approval-response message id, or 6–8-digit TOTP code.
89
+ */
90
+ proof: string;
91
+ /**
92
+ * Maintainer-issued challenge id the proof responds to.
93
+ */
94
+ challengeId: string;
95
+ }
96
+
97
+ /** Trust Task type URI. */
98
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/sign-trust-task/0.2" as const;
99
+
100
+ /** Trust Task response type URI (request type URI + "#response"). */
101
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/sign-trust-task/0.2#response" as const;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/sync/0.2/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Consumer requests an incremental delta of vault changes since a given seq baseline. The maintainer returns an ordered list of upsert/delete/acl/policy events, followed by a new seq baseline the consumer SHOULD persist for the next sync. Pairs with sync/event/0.1 server-push notifications: a live consumer subscribes to push events; on reconnect after offline, it calls vault/sync to catch up.
8
+ */
9
+ export interface VaultSyncPayload {
10
+ /**
11
+ * Optional — narrow the delta to a single context. Omit for all contexts the consumer has VaultRead on.
12
+ */
13
+ contextId?: string;
14
+ /**
15
+ * The seq value the consumer last received. Omit on first sync (= full snapshot). When supplied, the maintainer returns events with seq > sinceSeq.
16
+ */
17
+ sinceSeq?: number;
18
+ /**
19
+ * Maximum number of events to include in this response. Maintainer-defined default and ceiling.
20
+ */
21
+ pageSize?: number;
22
+ ext?: Ext;
23
+ }
24
+ /**
25
+ * 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.
26
+ */
27
+ export interface Ext {
28
+ [k: string]: unknown | undefined;
29
+ }
30
+
31
+ /** Trust Task type URI. */
32
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/sync/0.2" as const;
33
+
34
+ /** Trust Task response type URI (request type URI + "#response"). */
35
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/sync/0.2#response" as const;
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/upsert/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 for the secret type stored in the entry. Definitions:
12
+ * - `password` — username + password (+ optional TOTP seed).
13
+ * - `passkey` — WebAuthn discoverable credential (private key + rpId + userHandle).
14
+ * - `oauthTokens` — OAuth 2.0 refresh + access token bundle for a specific provider.
15
+ * - `didSelfIssued` — Self-Issued OpenID Provider v2 (SIOP) credential: the entry points at a DID + signing key already managed by the VTA.
16
+ * - `didcommPeer` — DIDComm peer identity used to authenticate against a DIDComm-speaking relying party.
17
+ * - `bearerToken` — opaque bearer token carried in a maintainer-named header (covers API tokens, long-lived JWTs, personal-access tokens).
18
+ * - `sshKey` — SSH private key + comment.
19
+ * - `custom` — arbitrary structured fields; release-time consumer responsible for interpretation.
20
+ */
21
+ export type SecretKind =
22
+ | "password"
23
+ | "passkey"
24
+ | "oauthTokens"
25
+ | "didSelfIssued"
26
+ | "didcommPeer"
27
+ | "bearerToken"
28
+ | "sshKey"
29
+ | "custom";
30
+ /**
31
+ * Pluggable cipher envelope (discriminated by `envelope`) whose cleartext is a JCS-canonical JSON conforming to `vault/_shared/0.1/vault-secret#/$defs/VaultSecret`. The supported envelope kinds are listed in the SealedEnvelope shared schema; M2A consumers reject any kind they don't implement with `vault/upsert:envelope_unsupported`. REQUIRED on create unless `secretKind` is `didSelfIssued` or `didcommPeer` (those carry only references to maintainer-internal key ids and have no extra secret bytes). On update, omit if the secret material is unchanged; populate if the secret is being rotated.
32
+ */
33
+ export type SealedEnvelope = DidcommAuthcryptEnvelope | HpkeArmoredEnvelope | TspMessageEnvelope;
34
+
35
+ /**
36
+ * Create a new vault entry or update an existing one. The secret material — if present — rides inside a pluggable cipher envelope (see `vault/_shared/0.1/sealed-envelope`), so the Trust Task carries ciphertext and an authenticator, not plaintext. Updates may be partial: any populated metadata field replaces the current value; omitted fields are left untouched; explicit null clears the field (per `clearFields`). Optimistic-concurrency check via `expectedVersion`.
37
+ */
38
+ export interface VaultUpsertPayload {
39
+ /**
40
+ * Entry id. Omit to create; supply to update. Maintainers MAY accept consumer-supplied ids on create (recommended: ULID) or MAY assign their own and return the assigned id in the response.
41
+ */
42
+ id?: string;
43
+ /**
44
+ * When updating, the consumer's last-observed `version` for the entry. The maintainer rejects with `vault/upsert:version_conflict` if the current version differs. Omit on create.
45
+ */
46
+ expectedVersion?: number;
47
+ /**
48
+ * Trust context the entry belongs to. Cannot be changed by upsert; to move an entry between contexts the consumer MUST delete and recreate.
49
+ */
50
+ contextId: string;
51
+ /**
52
+ * @minItems 1
53
+ */
54
+ targets: [SiteTarget, ...SiteTarget[]];
55
+ label: string;
56
+ secretKind: SecretKind;
57
+ tags?: string[];
58
+ notes?: string;
59
+ favicon?: string;
60
+ selectors?: string[];
61
+ customFieldNames?: string[];
62
+ expiresAt?: string;
63
+ sealedSecret?: SealedEnvelope;
64
+ /**
65
+ * List of metadata fields to explicitly clear on this upsert. Distinguishes "don't touch" (field omitted from payload) from "clear" (field listed here).
66
+ */
67
+ clearFields?: ("notes" | "favicon" | "expiresAt" | "tags" | "selectors" | "customFieldNames")[];
68
+ ext?: Ext;
69
+ }
70
+ export interface WebOrigin {
71
+ kind: "webOrigin";
72
+ /**
73
+ * 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.
74
+ */
75
+ origin: string;
76
+ }
77
+ export interface Did {
78
+ kind: "did";
79
+ /**
80
+ * 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.
81
+ */
82
+ did: string;
83
+ }
84
+ export interface IosApp {
85
+ kind: "iosApp";
86
+ /**
87
+ * 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).
88
+ */
89
+ bundleId: string;
90
+ /**
91
+ * 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.
92
+ */
93
+ teamId?: string;
94
+ }
95
+ export interface AndroidApp {
96
+ kind: "androidApp";
97
+ /**
98
+ * Android package name in reverse-DNS form (e.g. "com.github.android").
99
+ */
100
+ packageName: string;
101
+ /**
102
+ * 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).
103
+ *
104
+ * @minItems 1
105
+ */
106
+ sha256CertFingerprints: [string, ...string[]];
107
+ }
108
+ /**
109
+ * DIDComm v2 authcrypt JWE (ECDH-1PU + A256CBC-HS512, X25519/P-256 key agreement). Sender authentication is the JWE's `skid` — the producer's DID#keyAgreement. The maintainer's keyAgreement key is the recipient. Cleartext is JCS-canonical JSON of the variant's payload type.
110
+ *
111
+ * M2A is the only implementation today; this is also the canonical default for new code.
112
+ */
113
+ export interface DidcommAuthcryptEnvelope {
114
+ envelope: "didcommAuthcrypt";
115
+ /**
116
+ * Compact DIDComm v2 JWE (base64url-encoded, dot-separated). Unpacks via the framework's standard DIDComm machinery; cleartext is the payload-specific JSON.
117
+ */
118
+ jwe: string;
119
+ }
120
+ /**
121
+ * OpenPGP-style ASCII-armored HPKE bundle — the existing OpenVTC sealed-transfer wire form (X25519-HKDF-SHA256 KEM + ChaCha20-Poly1305 AEAD, framed in armor with Bundle-Id / Digest-Algo headers and a CRC24 checksum). Producer assertion (`didSigned` / `attested` / `pinnedOnly`) is the integrity / authenticity anchor.
122
+ *
123
+ * No open-source implementation reads this yet outside vta-sdk's `sealed_transfer` crate; new code SHOULD prefer the DIDComm variant. Defined here for parity with the existing offline-bundle / cross-VTA workflows that the design plan reserves for M5+.
124
+ */
125
+ export interface HpkeArmoredEnvelope {
126
+ envelope: "hpkeArmored";
127
+ /**
128
+ * ASCII-armored bundle text. Multi-line base64 with framing headers + CRC24.
129
+ */
130
+ armored: string;
131
+ /**
132
+ * did:key identifier of the X25519 public key the envelope was sealed to. The recipient uses this to select the matching private key.
133
+ */
134
+ recipientKeyId: string;
135
+ /**
136
+ * Producer-assertion mode per the sealed-transfer framework. `didSigned` = Ed25519 signature by issuer; `attested` = TEE attestation quote (e.g. Nitro); `pinnedOnly` = OOB SHA-256 digest only (dev/test, NOT for production).
137
+ */
138
+ producerAssertion?: "didSigned" | "attested" | "pinnedOnly";
139
+ }
140
+ /**
141
+ * Trust Spanning Protocol message (https://trustoverip.github.io/tswg-tsp-specification/). Reserved variant; no OpenVTC component reads or emits this today. Listed in the union so implementations can declare intent to use TSP in discovery and so consumers reject `tspMessage` envelopes explicitly (`envelope_unsupported`) until they're wired up — rather than silently failing in DIDComm parsing.
142
+ */
143
+ export interface TspMessageEnvelope {
144
+ envelope: "tspMessage";
145
+ /**
146
+ * Base64url-encoded TSP message bytes. Format reference: https://trustoverip.github.io/tswg-tsp-specification/#message-format
147
+ */
148
+ message: string;
149
+ }
150
+ /**
151
+ * 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.
152
+ */
153
+ export interface Ext {
154
+ [k: string]: unknown | undefined;
155
+ }
156
+
157
+ /** Trust Task type URI. */
158
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/upsert/0.2" as const;
159
+
160
+ /** Trust Task response type URI (request type URI + "#response"). */
161
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/upsert/0.2#response" as const;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/usage/0.2/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Consumer queries the maintainer's audit log of recent vault uses (proxy-logins, releases). Drives UIs like "recent activity" and "which AI agent has been using my GitHub credential". Read-only.
8
+ */
9
+ export interface VaultUsagePayload {
10
+ /**
11
+ * Optional filter — usage for this entry only.
12
+ */
13
+ entryId?: string;
14
+ /**
15
+ * Optional filter — usage within this trust context only.
16
+ */
17
+ contextId?: string;
18
+ /**
19
+ * Optional filter — usage by this consumer DID only. Useful for "what has AI agent X been doing on my behalf".
20
+ */
21
+ byConsumer?: string;
22
+ since?: string;
23
+ until?: string;
24
+ kindFilter?: ("proxyLogin" | "release")[];
25
+ pageSize?: number;
26
+ cursor?: string;
27
+ ext?: Ext;
28
+ }
29
+ /**
30
+ * 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.
31
+ */
32
+ export interface Ext {
33
+ [k: string]: unknown | undefined;
34
+ }
35
+
36
+ /** Trust Task type URI. */
37
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/usage/0.2" as const;
38
+
39
+ /** Trust Task response type URI (request type URI + "#response"). */
40
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/usage/0.2#response" as const;