@openvtc/trust-tasks 0.3.0 → 0.4.1
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/_framework/0.3/framework.d.ts +13 -0
- package/dist/_framework/0.3/framework.d.ts.map +1 -0
- package/dist/_framework/0.3/framework.js +6 -0
- package/dist/_framework/0.3/framework.js.map +1 -0
- package/dist/audit/list/0.1/payload.d.ts +11 -9
- package/dist/audit/list/0.1/payload.d.ts.map +1 -1
- package/dist/audit/list/0.1/payload.js.map +1 -1
- package/dist/audit/verify/0.1/payload.d.ts +6 -5
- package/dist/audit/verify/0.1/payload.d.ts.map +1 -1
- package/dist/audit/verify/0.1/payload.js.map +1 -1
- package/dist/chat/message/0.1/payload.d.ts +11 -9
- package/dist/chat/message/0.1/payload.d.ts.map +1 -1
- package/dist/chat/message/0.1/payload.js.map +1 -1
- package/dist/consent/request/1.0/payload.d.ts +6 -5
- package/dist/consent/request/1.0/payload.d.ts.map +1 -1
- package/dist/consent/request/1.0/payload.js.map +1 -1
- package/dist/credentials/_shared/0.2/credentials.d.ts +15 -0
- package/dist/credentials/_shared/0.2/credentials.d.ts.map +1 -0
- package/dist/credentials/_shared/0.2/credentials.js +6 -0
- package/dist/credentials/_shared/0.2/credentials.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/policy/evaluate/0.3/payload.d.ts +6 -5
- package/dist/policy/evaluate/0.3/payload.d.ts.map +1 -1
- package/dist/policy/evaluate/0.3/payload.js.map +1 -1
- package/dist/task-consent/decision/0.1/payload.d.ts +11 -9
- package/dist/task-consent/decision/0.1/payload.d.ts.map +1 -1
- package/dist/task-consent/decision/0.1/payload.js.map +1 -1
- package/dist/task-consent/granted/0.1/payload.d.ts +6 -5
- package/dist/task-consent/granted/0.1/payload.d.ts.map +1 -1
- package/dist/task-consent/granted/0.1/payload.js.map +1 -1
- package/dist/task-consent/request/0.1/payload.d.ts +6 -5
- package/dist/task-consent/request/0.1/payload.d.ts.map +1 -1
- package/dist/task-consent/request/0.1/payload.js.map +1 -1
- package/dist/trust-task-next-step/0.1/payload.d.ts +92 -0
- package/dist/trust-task-next-step/0.1/payload.d.ts.map +1 -0
- package/dist/trust-task-next-step/0.1/payload.js +18 -0
- package/dist/trust-task-next-step/0.1/payload.js.map +1 -0
- package/dist/vta/credentials/issue/0.1/payload.d.ts +2 -0
- package/dist/vta/credentials/issue/0.1/payload.d.ts.map +1 -1
- package/dist/vta/credentials/issue/0.1/payload.js.map +1 -1
- package/dist/vta/credentials/issue/0.2/payload.d.ts +94 -0
- package/dist/vta/credentials/issue/0.2/payload.d.ts.map +1 -0
- package/dist/vta/credentials/issue/0.2/payload.js +31 -0
- package/dist/vta/credentials/issue/0.2/payload.js.map +1 -0
- package/dist/vtc/relationships/request/0.1/payload.d.ts +65 -0
- package/dist/vtc/relationships/request/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/request/0.1/payload.js +31 -0
- package/dist/vtc/relationships/request/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_framework/0.3/framework.ts +13 -0
- package/src/audit/list/0.1/payload.ts +12 -9
- package/src/audit/verify/0.1/payload.ts +7 -5
- package/src/chat/message/0.1/payload.ts +12 -9
- package/src/consent/request/1.0/payload.ts +7 -5
- package/src/credentials/_shared/0.2/credentials.ts +15 -0
- package/src/index.ts +5 -0
- package/src/policy/evaluate/0.3/payload.ts +6 -5
- package/src/task-consent/decision/0.1/payload.ts +11 -9
- package/src/task-consent/granted/0.1/payload.ts +7 -5
- package/src/task-consent/request/0.1/payload.ts +7 -5
- package/src/trust-task-next-step/0.1/payload.ts +95 -0
- package/src/vta/credentials/issue/0.1/payload.ts +2 -0
- package/src/vta/credentials/issue/0.2/payload.ts +101 -0
- package/src/vtc/relationships/request/0.1/payload.ts +71 -0
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Source: specs/audit/verify/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The `entryHash` of the newest envelope reached, in the same multibase-multihash encoding the envelope carries it. Absent when the log is empty.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* Request to verify the integrity of a maintainer's append-only audit hash chain. The request carries no parameters — verification is store-wide.
|
|
8
13
|
*/
|
|
@@ -39,10 +44,7 @@ export interface AuditVerifyResponsePayload {
|
|
|
39
44
|
* Envelopes that could not be deserialized and so could not be checked. Reported at the same prominence as a break, not swallowed.
|
|
40
45
|
*/
|
|
41
46
|
unparseableSkipped: number;
|
|
42
|
-
|
|
43
|
-
* Hex `entryHash` of the newest envelope reached. Absent when the log is empty.
|
|
44
|
-
*/
|
|
45
|
-
head?: string;
|
|
47
|
+
head?: DigestMultibase;
|
|
46
48
|
chainBreak?: ChainBreak;
|
|
47
49
|
ext?: Ext;
|
|
48
50
|
}
|
|
@@ -68,7 +70,7 @@ export interface ChainBreak {
|
|
|
68
70
|
export const TYPE_URI = "https://trusttasks.org/spec/audit/verify/0.1" as const;
|
|
69
71
|
|
|
70
72
|
/** Stable alias for this specification's request payload shape. */
|
|
71
|
-
export type Payload =
|
|
73
|
+
export type Payload = DigestMultibase;
|
|
72
74
|
|
|
73
75
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
74
76
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/audit/verify/0.1#response" as const;
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
* Source: specs/chat/message/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* OPTIONAL. Multibase-encoded multihash over the attachment bytes, so the reference is itself verifiable and tamper-evident. Taken over the bytes as transferred, not over any JSON wrapper.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
/**
|
|
11
|
+
* Multibase-encoded multihash over the RFC 8785 (JCS) canonicalization of the previous document, so a gap, reorder, or removal in the chain is detectable. The algorithm travels in the multihash rather than being fixed here.
|
|
12
|
+
*/
|
|
13
|
+
export type DigestMultibase1 = string;
|
|
14
|
+
|
|
6
15
|
/**
|
|
7
16
|
* A conversational message exchanged between an AI agent and a messaging-platform bridge. Signed by its author (via the document `proof`) and hash-linked to the previous message in the conversation (`prev`), so a third party can verify each message's author and ordering after the transport has closed — for audit and dispute resolution. Conversations and contacts are referenced by opaque, bridge-issued handles, never raw platform addresses.
|
|
8
17
|
*/
|
|
@@ -85,10 +94,7 @@ export interface AttachmentRef {
|
|
|
85
94
|
* OPTIONAL. Size in bytes, if known ahead of fetch.
|
|
86
95
|
*/
|
|
87
96
|
sizeBytes?: number;
|
|
88
|
-
|
|
89
|
-
* OPTIONAL. Multihash digest of the attachment bytes, so the reference is itself verifiable and tamper-evident.
|
|
90
|
-
*/
|
|
91
|
-
digest?: string;
|
|
97
|
+
digest?: DigestMultibase;
|
|
92
98
|
}
|
|
93
99
|
/**
|
|
94
100
|
* OPTIONAL on the first message in a conversation; present on every message thereafter. Links to the previous message so the conversation forms a verifiable, ordered chain.
|
|
@@ -98,10 +104,7 @@ export interface ChainLink {
|
|
|
98
104
|
* The `id` of the previous `chat/message` Trust Task document in this conversation.
|
|
99
105
|
*/
|
|
100
106
|
id: string;
|
|
101
|
-
|
|
102
|
-
* Multihash digest (e.g. `sha-256`) over the previous document, so a gap, reorder, or removal in the chain is detectable.
|
|
103
|
-
*/
|
|
104
|
-
digest: string;
|
|
107
|
+
digest: DigestMultibase1;
|
|
105
108
|
}
|
|
106
109
|
/**
|
|
107
110
|
* 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.
|
|
@@ -114,7 +117,7 @@ export interface Ext {
|
|
|
114
117
|
export const TYPE_URI = "https://trusttasks.org/spec/chat/message/0.1" as const;
|
|
115
118
|
|
|
116
119
|
/** Stable alias for this specification's request payload shape. */
|
|
117
|
-
export type Payload =
|
|
120
|
+
export type Payload = DigestMultibase;
|
|
118
121
|
|
|
119
122
|
/**
|
|
120
123
|
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Source: specs/consent/request/1.0/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Optional multibase-encoded multihash over the rfc 8785 (jcs) canonicalization of the held first message, binding the request to concrete content.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* A bridge asks the VTA whether an inbound conversation may reach an AI agent, prompting operator consent on first contact.
|
|
8
13
|
*/
|
|
@@ -20,10 +25,7 @@ export interface ConsentRequestPayload {
|
|
|
20
25
|
* Optional operator-facing label (e.g. "Signal group 'Family'"). MUST NOT contain a raw platform address.
|
|
21
26
|
*/
|
|
22
27
|
displayHint?: string;
|
|
23
|
-
|
|
24
|
-
* Optional multihash digest of the held first message, binding the request to concrete content.
|
|
25
|
-
*/
|
|
26
|
-
firstMessageDigest?: string;
|
|
28
|
+
firstMessageDigest?: DigestMultibase;
|
|
27
29
|
/**
|
|
28
30
|
* Optional VTA context path the bridge runs under, to scope approver resolution.
|
|
29
31
|
*/
|
|
@@ -80,7 +82,7 @@ export interface ConsentRequestResponsePayload {
|
|
|
80
82
|
export const TYPE_URI = "https://trusttasks.org/spec/consent/request/1.0" as const;
|
|
81
83
|
|
|
82
84
|
/** Stable alias for this specification's request payload shape. */
|
|
83
|
-
export type Payload =
|
|
85
|
+
export type Payload = DigestMultibase;
|
|
84
86
|
|
|
85
87
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
86
88
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/request/1.0#response" as const;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/credentials/_shared/0.2/credentials.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The credential-minting core shared by every family that issues or revokes a Verifiable Credential (vta/credentials/*, vtc/endorsements/*, and future issuers). A family embeds these definitions rather than restating them, so the issuance receipt and the revocation receipt have one canonical shape across the registry. Families remain separate Trust Tasks because their trust semantics differ (approval plane, third-party verifiability, governance gating); only the mechanism is shared.
|
|
8
|
+
*
|
|
9
|
+
* Two levels of reuse are offered. A family whose response IS a receipt embeds `IssuedCredential` / `RevocationReceipt` whole, as vtc/endorsements does. A family whose response carries additional members alongside the receipt fields cannot do that — these definitions are `additionalProperties: false`, so composing one via `allOf` would reject the extra members — and instead references `CredentialId`, the identifier both receipts are keyed by, as vta/credentials does.
|
|
10
|
+
*
|
|
11
|
+
* `CredentialId` is hoisted and the other members are not, deliberately: it is the one field carrying a constraint worth stating once (non-empty), and the code generators mint a named type per `$def`, so hoisting a plain timestamp or the opaque credential object would wrap `expiresAt` and `credential` in newtypes for every consumer while deduplicating nothing but a description.
|
|
12
|
+
*/
|
|
13
|
+
export interface CredentialsSharedIssuanceAndRevocationDefinitions {
|
|
14
|
+
[k: string]: unknown | undefined;
|
|
15
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./_runtime/index.js";
|
|
|
7
7
|
|
|
8
8
|
export * as FrameworkShared_v0_1 from "./_framework/0.1/framework.js";
|
|
9
9
|
export * as FrameworkShared_v0_2 from "./_framework/0.2/framework.js";
|
|
10
|
+
export * as FrameworkShared_v0_3 from "./_framework/0.3/framework.js";
|
|
10
11
|
export * as AclEntryShared_v0_1 from "./acl/_shared/0.1/acl-entry.js";
|
|
11
12
|
export * as AclChangeRole_v0_1 from "./acl/change-role/0.1/payload.js";
|
|
12
13
|
export * as AclGrant_v0_1 from "./acl/grant/0.1/payload.js";
|
|
@@ -70,6 +71,7 @@ export * as CredentialExchangePresent_v0_1 from "./credential-exchange/present/0
|
|
|
70
71
|
export * as CredentialExchangeQuery_v0_1 from "./credential-exchange/query/0.1/payload.js";
|
|
71
72
|
export * as CredentialExchangeRequest_v0_1 from "./credential-exchange/request/0.1/payload.js";
|
|
72
73
|
export * as CredentialsShared_v0_1 from "./credentials/_shared/0.1/credentials.js";
|
|
74
|
+
export * as CredentialsShared_v0_2 from "./credentials/_shared/0.2/credentials.js";
|
|
73
75
|
export * as DeviceBindingShared_v0_1 from "./device/_shared/0.1/device-binding.js";
|
|
74
76
|
export * as DeviceBindingShared_v0_2 from "./device/_shared/0.2/device-binding.js";
|
|
75
77
|
export * as DeviceDisable_v0_1 from "./device/disable/0.1/payload.js";
|
|
@@ -205,6 +207,7 @@ export * as TrustTaskDiscovery_v0_1 from "./trust-task-discovery/0.1/payload.js"
|
|
|
205
207
|
export * as TrustTaskError_v0_1 from "./trust-task-error/0.1/payload.js";
|
|
206
208
|
export * as TrustTaskError_v0_2 from "./trust-task-error/0.2/payload.js";
|
|
207
209
|
export * as TrustTaskError_v0_3 from "./trust-task-error/0.3/payload.js";
|
|
210
|
+
export * as TrustTaskNextStep_v0_1 from "./trust-task-next-step/0.1/payload.js";
|
|
208
211
|
export * as ConsumerContextShared_v0_1 from "./vault/_shared/0.1/consumer-context.js";
|
|
209
212
|
export * as SealedEnvelopeShared_v0_1 from "./vault/_shared/0.1/sealed-envelope.js";
|
|
210
213
|
export * as SessionBlobShared_v0_1 from "./vault/_shared/0.1/session-blob.js";
|
|
@@ -241,6 +244,7 @@ export * as VtaContextsDidTemplatesList_v1_0 from "./vta/contexts/did-templates/
|
|
|
241
244
|
export * as VtaContextsDidTemplatesRender_v1_0 from "./vta/contexts/did-templates/render/1.0/payload.js";
|
|
242
245
|
export * as VtaContextsDidTemplatesUpdate_v1_0 from "./vta/contexts/did-templates/update/1.0/payload.js";
|
|
243
246
|
export * as VtaCredentialsIssue_v0_1 from "./vta/credentials/issue/0.1/payload.js";
|
|
247
|
+
export * as VtaCredentialsIssue_v0_2 from "./vta/credentials/issue/0.2/payload.js";
|
|
244
248
|
export * as VtaCredentialsRevoke_v0_1 from "./vta/credentials/revoke/0.1/payload.js";
|
|
245
249
|
export * as VtaDidTemplatesCreate_v1_0 from "./vta/did-templates/create/1.0/payload.js";
|
|
246
250
|
export * as VtaDidTemplatesCreate_v2_0 from "./vta/did-templates/create/2.0/payload.js";
|
|
@@ -332,6 +336,7 @@ export * as VtcRegistryDiagnostics_v0_1 from "./vtc/registry/diagnostics/0.1/pay
|
|
|
332
336
|
export * as VtcRelationshipsGraph_v0_1 from "./vtc/relationships/graph/0.1/payload.js";
|
|
333
337
|
export * as VtcRelationshipsList_v0_1 from "./vtc/relationships/list/0.1/payload.js";
|
|
334
338
|
export * as VtcRelationshipsPublish_v0_1 from "./vtc/relationships/publish/0.1/payload.js";
|
|
339
|
+
export * as VtcRelationshipsRequest_v0_1 from "./vtc/relationships/request/0.1/payload.js";
|
|
335
340
|
export * as VtcRelationshipsRevoke_v0_1 from "./vtc/relationships/revoke/0.1/payload.js";
|
|
336
341
|
export * as VtcWebsiteFilesDelete_v0_1 from "./vtc/website/files/delete/0.1/payload.js";
|
|
337
342
|
export * as VtcWebsiteFilesList_v0_1 from "./vtc/website/files/list/0.1/payload.js";
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* Source: specs/policy/evaluate/0.3/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Multibase-encoded multihash over the RFC 8785 (JCS) canonicalization of the payload, salted with the request challenge, present when a delegated-execution consent flow must bind approval to this exact payload. Absent when no consent binding is in play.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
6
10
|
/**
|
|
7
11
|
* 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
12
|
*/
|
|
@@ -42,10 +46,7 @@ export interface PolicyInput {
|
|
|
42
46
|
* The identifier the task acts on — the value at the spec's `subjectPath` (usually a DID). The evaluator checks the consumer's authority to act on this subject. Absent for subjectless tasks (discovery, list).
|
|
43
47
|
*/
|
|
44
48
|
subject?: string;
|
|
45
|
-
|
|
46
|
-
* Multihash of the canonicalized payload, salted with the request challenge, present when a delegated-execution consent flow must bind approval to this exact payload. Absent when no consent binding is in play.
|
|
47
|
-
*/
|
|
48
|
-
payloadDigest?: string;
|
|
49
|
+
payloadDigest?: DigestMultibase;
|
|
49
50
|
/**
|
|
50
51
|
* Authoritative integrity class (SPEC §7.3 item 13). The evaluator MUST derive this from the compiled handler it is about to invoke, not from the wire — the registry's declared value is advisory only.
|
|
51
52
|
*/
|
|
@@ -176,7 +177,7 @@ export interface PolicyDecision {
|
|
|
176
177
|
export const TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.3" as const;
|
|
177
178
|
|
|
178
179
|
/** Stable alias for this specification's request payload shape. */
|
|
179
|
-
export type Payload =
|
|
180
|
+
export type Payload = DigestMultibase;
|
|
180
181
|
|
|
181
182
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
182
183
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.3#response" as const;
|
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
* Source: specs/task-consent/decision/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Echoes the digest of the task being authorized, in the encoding `task-consent/request` carried it. The executor re-derives it from the payload it is about to execute and refuses on mismatch — this is what makes the approved payload the executed payload, cryptographically rather than by convention.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
6
10
|
/**
|
|
7
11
|
* The approver's answer. `deny` aborts the pending request; a subsequent submit of the same task starts a fresh one.
|
|
8
12
|
*/
|
|
9
13
|
export type Decision = "approve" | "deny";
|
|
14
|
+
/**
|
|
15
|
+
* The digest this decision concerned, in the encoding `task-consent/request` carried it.
|
|
16
|
+
*/
|
|
17
|
+
export type DigestMultibase1 = string;
|
|
10
18
|
|
|
11
19
|
/**
|
|
12
20
|
* An enrolled approver authorizes (or refuses) one pending privileged task, bound to the exact payload it was shown. The proof on this document — not the transport session that carried it — is the authorization.
|
|
@@ -16,10 +24,7 @@ export interface TaskConsentDecisionPayload {
|
|
|
16
24
|
* Echoes the task-consent/request this decision answers, binding it to that one pending request. An executor MUST consume the challenge at execution rather than on receipt of this decision: a decision authorizes exactly one execution, and consuming it earlier lets an executor's own retry legitimately replay it.
|
|
17
25
|
*/
|
|
18
26
|
challenge: string;
|
|
19
|
-
|
|
20
|
-
* Echoes the digest of the task being authorized. The executor re-derives it from the payload it is about to execute and refuses on mismatch — this is what makes the approved payload the executed payload, cryptographically rather than by convention.
|
|
21
|
-
*/
|
|
22
|
-
payloadDigest: string;
|
|
27
|
+
payloadDigest: DigestMultibase;
|
|
23
28
|
decision: Decision;
|
|
24
29
|
/**
|
|
25
30
|
* OPTIONAL human-facing note, most useful on a `deny`.
|
|
@@ -41,10 +46,7 @@ export interface TaskConsentDecisionResponsePayload {
|
|
|
41
46
|
* `granted` = the threshold is met and the requester's re-submit will now execute. `pending` = the approval was recorded but more are needed. `denied` = the request was aborted.
|
|
42
47
|
*/
|
|
43
48
|
status: "granted" | "pending" | "denied";
|
|
44
|
-
|
|
45
|
-
* The digest this decision concerned.
|
|
46
|
-
*/
|
|
47
|
-
payloadDigest: string;
|
|
49
|
+
payloadDigest: DigestMultibase1;
|
|
48
50
|
/**
|
|
49
51
|
* Distinct approvals recorded so far.
|
|
50
52
|
*/
|
|
@@ -60,7 +62,7 @@ export interface TaskConsentDecisionResponsePayload {
|
|
|
60
62
|
export const TYPE_URI = "https://trusttasks.org/spec/task-consent/decision/0.1" as const;
|
|
61
63
|
|
|
62
64
|
/** Stable alias for this specification's request payload shape. */
|
|
63
|
-
export type Payload =
|
|
65
|
+
export type Payload = DigestMultibase;
|
|
64
66
|
|
|
65
67
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
66
68
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/task-consent/decision/0.1#response" as const;
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Source: specs/task-consent/granted/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The salted wire digest of the approved task — the same value the matching task-consent/request carried and the decision echoed. The requester already holds it; it is repeated here only so the requester can correlate the notice to the pending task it should now re-submit. It confers nothing: the executor's single-use grant lookup at re-submit is the authorization.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* Fire-and-forget notice from the executor to the requester that its pending task has reached the approval threshold and a single-use grant is waiting, so the requester re-submits at once instead of polling. Non-load-bearing by design: the grant check at re-submit is the real gate, so a lost or spurious notice costs at most one poll cycle.
|
|
8
13
|
*/
|
|
@@ -11,10 +16,7 @@ export interface TaskConsentGrantedPayload {
|
|
|
11
16
|
* Always `granted`. A denial sends no notice — the requester's re-submit discovers it, and a notice that could carry a denial would tempt a consumer into treating this advisory channel as the authoritative outcome, which it is not.
|
|
12
17
|
*/
|
|
13
18
|
status: "granted";
|
|
14
|
-
|
|
15
|
-
* The salted wire digest of the approved task — the same value the matching task-consent/request carried and the decision echoed. The requester already holds it; it is repeated here only so the requester can correlate the notice to the pending task it should now re-submit. It confers nothing: the executor's single-use grant lookup at re-submit is the authorization.
|
|
16
|
-
*/
|
|
17
|
-
payloadDigest: string;
|
|
19
|
+
payloadDigest: DigestMultibase;
|
|
18
20
|
/**
|
|
19
21
|
* Type URI of the approved task, for correlation and display at the requester. Advisory on the same terms as the digest — the executor re-derives everything it enforces from the re-submitted payload itself.
|
|
20
22
|
*/
|
|
@@ -32,7 +34,7 @@ export interface Ext {
|
|
|
32
34
|
export const TYPE_URI = "https://trusttasks.org/spec/task-consent/granted/0.1" as const;
|
|
33
35
|
|
|
34
36
|
/** Stable alias for this specification's request payload shape. */
|
|
35
|
-
export type Payload =
|
|
37
|
+
export type Payload = DigestMultibase;
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
40
|
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Source: specs/task-consent/request/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The binding between what the approver sees and what executes. Multibase-encoded multihash over the RFC 8785 (JCS) canonicalization of the payload, the task type, and the `challenge` as salt. The decision echoes it; the executor re-derives it from the payload it is about to run and refuses on mismatch. Salted because an unsalted digest over a low-entropy payload is a confirmation oracle for anyone who observes it in transit.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* The executor asks an enrolled approver device to authorize one pending privileged task, presenting the effects it computed by dry-running the real handler against its own prior state. The executor signs this document; the approver renders only what it verifies under that signature.
|
|
8
13
|
*/
|
|
@@ -15,10 +20,7 @@ export interface TaskConsentRequestPayload {
|
|
|
15
20
|
* Type URI of the task awaiting approval. It is bound into `payloadDigest`: without that binding, two tasks whose payloads canonicalize identically would share a digest, and an approval for a benign task would authorize a destructive one.
|
|
16
21
|
*/
|
|
17
22
|
taskType: string;
|
|
18
|
-
|
|
19
|
-
* The binding between what the approver sees and what executes. Digest of the canonical (RFC 8785 JCS) payload, the task type, and the `challenge` as salt. The decision echoes it; the executor re-derives it from the payload it is about to run and refuses on mismatch. Salted because an unsalted digest over a low-entropy payload is a confirmation oracle for anyone who observes it in transit.
|
|
20
|
-
*/
|
|
21
|
-
payloadDigest: string;
|
|
23
|
+
payloadDigest: DigestMultibase;
|
|
22
24
|
/**
|
|
23
25
|
* Authoritative SPEC §7.3 item 13 side-effect class of the pending task, derived by the executor from the compiled handler it is about to invoke. NEVER taken from the registry: a registry that decided this would be a consent kill-switch, downgradeable by publishing a new version with a weaker class.
|
|
24
26
|
*/
|
|
@@ -157,7 +159,7 @@ export interface TaskConsentRequestResponsePayload {
|
|
|
157
159
|
export const TYPE_URI = "https://trusttasks.org/spec/task-consent/request/0.1" as const;
|
|
158
160
|
|
|
159
161
|
/** Stable alias for this specification's request payload shape. */
|
|
160
|
-
export type Payload =
|
|
162
|
+
export type Payload = DigestMultibase;
|
|
161
163
|
|
|
162
164
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
163
165
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/task-consent/request/0.1#response" as const;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/trust-task-next-step/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The recipient-suggested continuation reserved at SPEC.md §8.6: the original task was understood, but cannot complete in isolation, and this names what the recipient party expects in order to proceed.
|
|
8
|
+
*
|
|
9
|
+
* A next step is neither a success response nor a failure. The originating task is left open — a consumer that means 'no' returns a trust-task-error instead, and one that means 'done' returns the originating specification's #response variant.
|
|
10
|
+
*
|
|
11
|
+
* This specification declares no response anchor: a producer answers a next step by issuing a document of the expected type, not by responding to this one.
|
|
12
|
+
*/
|
|
13
|
+
export interface TrustTaskNextStepPayload {
|
|
14
|
+
/**
|
|
15
|
+
* The continuations the recipient will accept, in the producer's order of preference where the recipient has one. More than one entry means ALTERNATIVES — satisfying any single entry unblocks the exchange, never all of them. A recipient that needs several things done first names the one it wants next and issues a further next step afterwards; expressing a conjunction here would be a flow definition, which belongs to a ceremony rather than to a single response.
|
|
16
|
+
*
|
|
17
|
+
* @minItems 1
|
|
18
|
+
*/
|
|
19
|
+
expects: [
|
|
20
|
+
{
|
|
21
|
+
/**
|
|
22
|
+
* The Type URI of the Trust Task the recipient expects next, including any #request fragment. A suggestion only: it confers no authorization to perform that task, and the producer applies its own policy before acting (see the specification's Security & Privacy section).
|
|
23
|
+
*/
|
|
24
|
+
typeUri: string;
|
|
25
|
+
/**
|
|
26
|
+
* Human-readable explanation of why this continuation is expected. Non-normative; intended for operator UI and logs.
|
|
27
|
+
*/
|
|
28
|
+
reason?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional structured data the producer MAY use when composing the expected document — a challenge to echo, an identifier to quote, a presentation definition to satisfy. Its shape is governed by the specification named in typeUri, not by this one. A producer MUST NOT treat a hint as authoritative for any value it can determine itself.
|
|
31
|
+
*/
|
|
32
|
+
hint?: {};
|
|
33
|
+
},
|
|
34
|
+
...{
|
|
35
|
+
/**
|
|
36
|
+
* The Type URI of the Trust Task the recipient expects next, including any #request fragment. A suggestion only: it confers no authorization to perform that task, and the producer applies its own policy before acting (see the specification's Security & Privacy section).
|
|
37
|
+
*/
|
|
38
|
+
typeUri: string;
|
|
39
|
+
/**
|
|
40
|
+
* Human-readable explanation of why this continuation is expected. Non-normative; intended for operator UI and logs.
|
|
41
|
+
*/
|
|
42
|
+
reason?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional structured data the producer MAY use when composing the expected document — a challenge to echo, an identifier to quote, a presentation definition to satisfy. Its shape is governed by the specification named in typeUri, not by this one. A producer MUST NOT treat a hint as authoritative for any value it can determine itself.
|
|
45
|
+
*/
|
|
46
|
+
hint?: {};
|
|
47
|
+
}[]
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* What happens once an expected task completes. `resubmit` (the default) means the expected task is a PREREQUISITE and the producer re-issues the originating request to continue — a new document with a fresh id and the same threadId, which SPEC §8.4 distinguishes from a retry, since a retry is bit-for-bit identical and is not what happens here; this matches the established pattern of task-consent/granted, where the requester re-submits once approval lands. `proceed` means the expected task IS the continuation and the originating request is not re-issued, as in an offer answered by a request.
|
|
51
|
+
*/
|
|
52
|
+
continuation?: "resubmit" | "proceed";
|
|
53
|
+
/**
|
|
54
|
+
* Identifies the Trust Task document this next step answers. SHOULD be populated, for the reason SPEC §8.2 gives for the identical member on an error response: threadId correlates the exchange only for a party that already saw the request, so a retained next step otherwise names neither the task it interrupted nor the instance.
|
|
55
|
+
*/
|
|
56
|
+
inResponseTo?: {
|
|
57
|
+
/**
|
|
58
|
+
* The Type URI of the document being answered, including any fragment it carried.
|
|
59
|
+
*/
|
|
60
|
+
typeUri: string;
|
|
61
|
+
/**
|
|
62
|
+
* The id of the specific document being answered (SPEC §4.3). Globally unique and never reused, so it names one instance where threadId names an exchange.
|
|
63
|
+
*/
|
|
64
|
+
id?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Human-readable description of why the task cannot complete in isolation. Non-normative. Subject to the same restraint as an error message: it reaches a party that may not be entitled to learn why.
|
|
68
|
+
*/
|
|
69
|
+
message?: string;
|
|
70
|
+
ext?: Ext;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 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.
|
|
74
|
+
*/
|
|
75
|
+
export interface Ext {
|
|
76
|
+
[k: string]: unknown | undefined;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Trust Task type URI. */
|
|
80
|
+
export const TYPE_URI = "https://trusttasks.org/spec/trust-task-next-step/0.1" as const;
|
|
81
|
+
|
|
82
|
+
/** Stable alias for this specification's request payload shape. */
|
|
83
|
+
export type Payload = TrustTaskNextStepPayload;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
87
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
88
|
+
* per-specification and cannot be derived from the document alone.
|
|
89
|
+
*/
|
|
90
|
+
export const SPEC = {
|
|
91
|
+
typeUri: TYPE_URI,
|
|
92
|
+
isBearer: false,
|
|
93
|
+
isProofRequired: false,
|
|
94
|
+
isRecipientRequired: true,
|
|
95
|
+
} as const;
|
|
@@ -39,6 +39,8 @@ export interface Ext {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* The success response to a vta/credentials/issue request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/credentials/issue/0.1#response.
|
|
42
|
+
*
|
|
43
|
+
* This is the credentials/_shared IssuedCredential shape — same members, same required set — plus `supersedes` and `ext`. It states them inline rather than `$ref`-ing the shared definition because that definition sets `additionalProperties: false`, which under `allOf` would reject the two extra members. The shared CredentialId is still referenced. Keep the two in step by hand if either changes.
|
|
42
44
|
*/
|
|
43
45
|
export interface VTACredentialsIssueResponsePayload {
|
|
44
46
|
credentialId: CredentialId;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/credentials/issue/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The success response to a vta/credentials/issue request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/credentials/issue/0.1#response.
|
|
8
|
+
*
|
|
9
|
+
* Composed from the shared IssuedCredential rather than restating it: that definition is the issuance receipt every issuer returns, and duplicating it here let the two drift silently. `unevaluatedProperties` closes the object after the `allOf` is applied, which is what makes the composition possible at all — `additionalProperties` is evaluated per-subschema against the whole object and would reject `supersedes` and `ext`.
|
|
10
|
+
*/
|
|
11
|
+
export type VTACredentialsIssueResponsePayload = IssuedCredentialBase;
|
|
12
|
+
/**
|
|
13
|
+
* Stable identifier for an issued credential — the handle for revocation and audit. Opaque to the holder: it MUST be echoed verbatim when revoking and MUST NOT be parsed.
|
|
14
|
+
*/
|
|
15
|
+
export type CredentialId = string;
|
|
16
|
+
|
|
17
|
+
export interface VTACredentialsIssuePayload {
|
|
18
|
+
/**
|
|
19
|
+
* DID of the credential's subject/holder (becomes credentialSubject.id).
|
|
20
|
+
*/
|
|
21
|
+
holder: string;
|
|
22
|
+
/**
|
|
23
|
+
* The scoped claims to attest — the share's scope. Opaque to the framework; non-empty.
|
|
24
|
+
*/
|
|
25
|
+
claims: {};
|
|
26
|
+
/**
|
|
27
|
+
* Additional credential type beyond VerifiableCredential (e.g. ScopedShareCredential). Some values name a claims profile defined by this specification (e.g. GovernancePolicyCredential), which constrains the shape of `claims`.
|
|
28
|
+
*/
|
|
29
|
+
credentialType?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Credential lifetime in seconds from issuance. The issuer MAY cap this.
|
|
32
|
+
*/
|
|
33
|
+
validitySeconds: number;
|
|
34
|
+
/**
|
|
35
|
+
* Optional human-readable rationale, recorded for audit.
|
|
36
|
+
*/
|
|
37
|
+
purpose?: string;
|
|
38
|
+
ext?: Ext;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
42
|
+
*/
|
|
43
|
+
export interface Ext {
|
|
44
|
+
[k: string]: unknown | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The members of an issuance receipt, deliberately left **open** so a consuming specification can `$ref` it under `allOf` and add its own, then close the result with `unevaluatedProperties: false`.
|
|
48
|
+
*
|
|
49
|
+
* A closure inside this definition would defeat that. Both `additionalProperties` and `unevaluatedProperties` are evaluated against the whole instance from within the subschema that declares them, and neither can see members the *outer* schema matched — so either one here rejects the consumer's extras. Only an `unevaluatedProperties` at the outer level sees everything the composition matched. Use `IssuedCredential` where a closed standalone shape is wanted.
|
|
50
|
+
*/
|
|
51
|
+
export interface IssuedCredentialBase {
|
|
52
|
+
credentialId: CredentialId;
|
|
53
|
+
/**
|
|
54
|
+
* The issued Verifiable Credential (W3C VC Data Model 2.0), signed by the issuer's key. Opaque to the framework.
|
|
55
|
+
*/
|
|
56
|
+
credential: {};
|
|
57
|
+
/**
|
|
58
|
+
* When the credential was minted.
|
|
59
|
+
*/
|
|
60
|
+
issuedAt?: string;
|
|
61
|
+
/**
|
|
62
|
+
* When the credential's validUntil falls due.
|
|
63
|
+
*/
|
|
64
|
+
expiresAt: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Trust Task type URI. */
|
|
68
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/credentials/issue/0.2" as const;
|
|
69
|
+
|
|
70
|
+
/** Stable alias for this specification's request payload shape. */
|
|
71
|
+
export type Payload = VTACredentialsIssueResponsePayload;
|
|
72
|
+
|
|
73
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
74
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/credentials/issue/0.2#response" as const;
|
|
75
|
+
|
|
76
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
77
|
+
export type Response = VTACredentialsIssueResponsePayload;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
81
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
82
|
+
* per-specification and cannot be derived from the document alone.
|
|
83
|
+
*/
|
|
84
|
+
export const SPEC = {
|
|
85
|
+
typeUri: TYPE_URI,
|
|
86
|
+
isBearer: false,
|
|
87
|
+
isProofRequired: true,
|
|
88
|
+
isRecipientRequired: true,
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
93
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
94
|
+
* parties (§7.3 item 5).
|
|
95
|
+
*/
|
|
96
|
+
export const RESPONSE_SPEC = {
|
|
97
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
98
|
+
isBearer: false,
|
|
99
|
+
isProofRequired: true,
|
|
100
|
+
isRecipientRequired: true,
|
|
101
|
+
} as const;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/relationships/request/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A member asks another member to issue them a Verifiable Relationship Credential. Everything here is a hint: the issuing member decides, and declines with a trust-task-error carrying `vtc/relationships/request:declined` rather than a bespoke rejection message.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCRelationshipsRequestPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Why the requester is asking, in their own words, for the issuing member to weigh. A hint and not a term — the issuing member is under no obligation to honour it, and MUST NOT treat its absence as a defect. Free text reaching a human, so a producer SHOULD keep it to what it is willing to have quoted back.
|
|
12
|
+
*/
|
|
13
|
+
reason?: string;
|
|
14
|
+
ext?: Ext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 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.
|
|
18
|
+
*/
|
|
19
|
+
export interface Ext {
|
|
20
|
+
[k: string]: unknown | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The issued credential. Returned only where the issuing member agreed; a decline is a trust-task-error, not a response with an empty field.
|
|
24
|
+
*/
|
|
25
|
+
export interface VTCRelationshipsRequestResponsePayload {
|
|
26
|
+
/**
|
|
27
|
+
* A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST be the issuing member — the party that signed this response — and its credentialSubject.id MUST name the requester. The same shape `vtc/relationships/publish` accepts, so a requester can lodge it with the community unchanged.
|
|
28
|
+
*/
|
|
29
|
+
vrc: {};
|
|
30
|
+
/**
|
|
31
|
+
* SHA-256 of the returned VRC, for out-of-band integrity checks. Matches the digest `vtc/relationships/publish` reports once the credential is lodged, so the two can be tied together without re-hashing.
|
|
32
|
+
*/
|
|
33
|
+
vrcSha256?: string;
|
|
34
|
+
ext?: Ext;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Trust Task type URI. */
|
|
38
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/request/0.1" as const;
|
|
39
|
+
|
|
40
|
+
/** Stable alias for this specification's request payload shape. */
|
|
41
|
+
export type Payload = VTCRelationshipsRequestPayload;
|
|
42
|
+
|
|
43
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
44
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/request/0.1#response" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
47
|
+
export type Response = VTCRelationshipsRequestResponsePayload;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
51
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
52
|
+
* per-specification and cannot be derived from the document alone.
|
|
53
|
+
*/
|
|
54
|
+
export const SPEC = {
|
|
55
|
+
typeUri: TYPE_URI,
|
|
56
|
+
isBearer: false,
|
|
57
|
+
isProofRequired: true,
|
|
58
|
+
isRecipientRequired: true,
|
|
59
|
+
} as const;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
63
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
64
|
+
* parties (§7.3 item 5).
|
|
65
|
+
*/
|
|
66
|
+
export const RESPONSE_SPEC = {
|
|
67
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
68
|
+
isBearer: false,
|
|
69
|
+
isProofRequired: true,
|
|
70
|
+
isRecipientRequired: true,
|
|
71
|
+
} as const;
|