@openvtc/trust-tasks 0.22.6 → 0.22.7

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 (189) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/_shared/components.d.ts +434 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/acl/_shared/0.1/acl-entry.d.ts +1 -1
  5. package/dist/acl/_shared/0.1/acl-entry.d.ts.map +1 -1
  6. package/dist/acl/_shared/0.2/acl-entry.d.ts +22 -0
  7. package/dist/acl/_shared/0.2/acl-entry.d.ts.map +1 -0
  8. package/dist/acl/_shared/0.2/acl-entry.js +6 -0
  9. package/dist/acl/_shared/0.2/acl-entry.js.map +1 -0
  10. package/dist/acl/change-role/0.1/payload.d.ts +1 -1
  11. package/dist/acl/change-role/0.1/payload.d.ts.map +1 -1
  12. package/dist/acl/change-role/0.2/payload.d.ts +1679 -0
  13. package/dist/acl/change-role/0.2/payload.d.ts.map +1 -0
  14. package/dist/acl/change-role/0.2/payload.js +955 -0
  15. package/dist/acl/change-role/0.2/payload.js.map +1 -0
  16. package/dist/acl/grant/0.1/payload.d.ts +1 -1
  17. package/dist/acl/grant/0.1/payload.d.ts.map +1 -1
  18. package/dist/acl/grant/0.2/payload.d.ts +1649 -0
  19. package/dist/acl/grant/0.2/payload.d.ts.map +1 -0
  20. package/dist/acl/grant/0.2/payload.js +942 -0
  21. package/dist/acl/grant/0.2/payload.js.map +1 -0
  22. package/dist/acl/list/0.1/payload.d.ts +1 -1
  23. package/dist/acl/list/0.1/payload.d.ts.map +1 -1
  24. package/dist/acl/list/0.2/payload.d.ts +1853 -0
  25. package/dist/acl/list/0.2/payload.d.ts.map +1 -0
  26. package/dist/acl/list/0.2/payload.js +1041 -0
  27. package/dist/acl/list/0.2/payload.js.map +1 -0
  28. package/dist/acl/revoke/0.1/payload.d.ts +1 -1
  29. package/dist/acl/revoke/0.1/payload.d.ts.map +1 -1
  30. package/dist/acl/revoke/0.2/payload.d.ts +1844 -0
  31. package/dist/acl/revoke/0.2/payload.d.ts.map +1 -0
  32. package/dist/acl/revoke/0.2/payload.js +1052 -0
  33. package/dist/acl/revoke/0.2/payload.js.map +1 -0
  34. package/dist/acl/show/0.1/payload.d.ts +1 -1
  35. package/dist/acl/show/0.1/payload.d.ts.map +1 -1
  36. package/dist/acl/show/0.2/payload.d.ts +1689 -0
  37. package/dist/acl/show/0.2/payload.d.ts.map +1 -0
  38. package/dist/acl/show/0.2/payload.js +968 -0
  39. package/dist/acl/show/0.2/payload.js.map +1 -0
  40. package/dist/acl/swap-key/0.1/payload.d.ts +1 -1
  41. package/dist/acl/swap-key/0.1/payload.d.ts.map +1 -1
  42. package/dist/acl/update/0.1/payload.d.ts +1 -1
  43. package/dist/acl/update/0.1/payload.d.ts.map +1 -1
  44. package/dist/acl/update/0.2/payload.d.ts +1784 -0
  45. package/dist/acl/update/0.2/payload.d.ts.map +1 -0
  46. package/dist/acl/update/0.2/payload.js +1005 -0
  47. package/dist/acl/update/0.2/payload.js.map +1 -0
  48. package/dist/auth/step-up/approve-request/0.4/payload.d.ts +672 -0
  49. package/dist/auth/step-up/approve-request/0.4/payload.d.ts.map +1 -0
  50. package/dist/auth/step-up/approve-request/0.4/payload.js +373 -0
  51. package/dist/auth/step-up/approve-request/0.4/payload.js.map +1 -0
  52. package/dist/auth/step-up/approve-response/0.6/payload.d.ts +974 -0
  53. package/dist/auth/step-up/approve-response/0.6/payload.d.ts.map +1 -0
  54. package/dist/auth/step-up/approve-response/0.6/payload.js +552 -0
  55. package/dist/auth/step-up/approve-response/0.6/payload.js.map +1 -0
  56. package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts +16 -0
  57. package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts.map +1 -0
  58. package/dist/auth/step-up/approver/_shared/0.1/approver.js +6 -0
  59. package/dist/auth/step-up/approver/_shared/0.1/approver.js.map +1 -0
  60. package/dist/auth/step-up/approver/attest/0.1/payload.d.ts +174 -0
  61. package/dist/auth/step-up/approver/attest/0.1/payload.d.ts.map +1 -0
  62. package/dist/auth/step-up/approver/attest/0.1/payload.js +97 -0
  63. package/dist/auth/step-up/approver/attest/0.1/payload.js.map +1 -0
  64. package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts +503 -0
  65. package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts.map +1 -0
  66. package/dist/auth/step-up/approver/enroll/0.1/payload.js +285 -0
  67. package/dist/auth/step-up/approver/enroll/0.1/payload.js.map +1 -0
  68. package/dist/auth/step-up/approver/invite/0.1/payload.d.ts +375 -0
  69. package/dist/auth/step-up/approver/invite/0.1/payload.d.ts.map +1 -0
  70. package/dist/auth/step-up/approver/invite/0.1/payload.js +200 -0
  71. package/dist/auth/step-up/approver/invite/0.1/payload.js.map +1 -0
  72. package/dist/auth/step-up/approver/list/0.1/payload.d.ts +477 -0
  73. package/dist/auth/step-up/approver/list/0.1/payload.d.ts.map +1 -0
  74. package/dist/auth/step-up/approver/list/0.1/payload.js +272 -0
  75. package/dist/auth/step-up/approver/list/0.1/payload.js.map +1 -0
  76. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts +512 -0
  77. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts.map +1 -0
  78. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js +290 -0
  79. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js.map +1 -0
  80. package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts +343 -0
  81. package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts.map +1 -0
  82. package/dist/auth/step-up/approver/redeem/start/0.1/payload.js +187 -0
  83. package/dist/auth/step-up/approver/redeem/start/0.1/payload.js.map +1 -0
  84. package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts +534 -0
  85. package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts.map +1 -0
  86. package/dist/auth/step-up/approver/revoke/0.1/payload.js +301 -0
  87. package/dist/auth/step-up/approver/revoke/0.1/payload.js.map +1 -0
  88. package/dist/index.d.ts +31 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +31 -0
  91. package/dist/index.js.map +1 -1
  92. package/dist/task-consent/decision/0.2/payload.d.ts +775 -0
  93. package/dist/task-consent/decision/0.2/payload.d.ts.map +1 -0
  94. package/dist/task-consent/decision/0.2/payload.js +450 -0
  95. package/dist/task-consent/decision/0.2/payload.js.map +1 -0
  96. package/dist/vtc/admin/actions/_shared/0.1/action.d.ts +24 -0
  97. package/dist/vtc/admin/actions/_shared/0.1/action.d.ts.map +1 -0
  98. package/dist/vtc/admin/actions/_shared/0.1/action.js +6 -0
  99. package/dist/vtc/admin/actions/_shared/0.1/action.js.map +1 -0
  100. package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts +1012 -0
  101. package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts.map +1 -0
  102. package/dist/vtc/admin/actions/acknowledge/0.1/payload.js +636 -0
  103. package/dist/vtc/admin/actions/acknowledge/0.1/payload.js.map +1 -0
  104. package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts +1026 -0
  105. package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts.map +1 -0
  106. package/dist/vtc/admin/actions/cancel/0.1/payload.js +641 -0
  107. package/dist/vtc/admin/actions/cancel/0.1/payload.js.map +1 -0
  108. package/dist/vtc/admin/actions/list/0.1/payload.d.ts +1200 -0
  109. package/dist/vtc/admin/actions/list/0.1/payload.d.ts.map +1 -0
  110. package/dist/vtc/admin/actions/list/0.1/payload.js +726 -0
  111. package/dist/vtc/admin/actions/list/0.1/payload.js.map +1 -0
  112. package/dist/vtc/admin/actions/show/0.1/payload.d.ts +1012 -0
  113. package/dist/vtc/admin/actions/show/0.1/payload.d.ts.map +1 -0
  114. package/dist/vtc/admin/actions/show/0.1/payload.js +636 -0
  115. package/dist/vtc/admin/actions/show/0.1/payload.js.map +1 -0
  116. package/dist/vtc/install/claim/finish/0.3/payload.d.ts +379 -0
  117. package/dist/vtc/install/claim/finish/0.3/payload.d.ts.map +1 -0
  118. package/dist/vtc/install/claim/finish/0.3/payload.js +205 -0
  119. package/dist/vtc/install/claim/finish/0.3/payload.js.map +1 -0
  120. package/dist/vtc/install/claim/start/0.3/payload.d.ts +368 -0
  121. package/dist/vtc/install/claim/start/0.3/payload.d.ts.map +1 -0
  122. package/dist/vtc/install/claim/start/0.3/payload.js +201 -0
  123. package/dist/vtc/install/claim/start/0.3/payload.js.map +1 -0
  124. package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts +208 -0
  125. package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts.map +1 -0
  126. package/dist/vtc/members/authority-reduced-notice/0.1/payload.js +112 -0
  127. package/dist/vtc/members/authority-reduced-notice/0.1/payload.js.map +1 -0
  128. package/dist/vtc/roles/_shared/0.1/role.d.ts +16 -0
  129. package/dist/vtc/roles/_shared/0.1/role.d.ts.map +1 -0
  130. package/dist/vtc/roles/_shared/0.1/role.js +6 -0
  131. package/dist/vtc/roles/_shared/0.1/role.js.map +1 -0
  132. package/dist/vtc/roles/define/0.1/payload.d.ts +703 -0
  133. package/dist/vtc/roles/define/0.1/payload.d.ts.map +1 -0
  134. package/dist/vtc/roles/define/0.1/payload.js +371 -0
  135. package/dist/vtc/roles/define/0.1/payload.js.map +1 -0
  136. package/dist/vtc/roles/delete/0.1/payload.d.ts +281 -0
  137. package/dist/vtc/roles/delete/0.1/payload.d.ts.map +1 -0
  138. package/dist/vtc/roles/delete/0.1/payload.js +152 -0
  139. package/dist/vtc/roles/delete/0.1/payload.js.map +1 -0
  140. package/dist/vtc/roles/list/0.1/payload.d.ts +639 -0
  141. package/dist/vtc/roles/list/0.1/payload.d.ts.map +1 -0
  142. package/dist/vtc/roles/list/0.1/payload.js +345 -0
  143. package/dist/vtc/roles/list/0.1/payload.js.map +1 -0
  144. package/dist/vtc/roles/show/0.1/payload.d.ts +651 -0
  145. package/dist/vtc/roles/show/0.1/payload.d.ts.map +1 -0
  146. package/dist/vtc/roles/show/0.1/payload.js +351 -0
  147. package/dist/vtc/roles/show/0.1/payload.js.map +1 -0
  148. package/package.json +1 -1
  149. package/src/_shared/components.ts +440 -1
  150. package/src/acl/_shared/0.1/acl-entry.ts +1 -1
  151. package/src/acl/_shared/0.2/acl-entry.ts +23 -0
  152. package/src/acl/change-role/0.1/payload.ts +1 -1
  153. package/src/acl/change-role/0.2/payload.ts +1011 -0
  154. package/src/acl/grant/0.1/payload.ts +1 -1
  155. package/src/acl/grant/0.2/payload.ts +990 -0
  156. package/src/acl/list/0.1/payload.ts +1 -1
  157. package/src/acl/list/0.2/payload.ts +1125 -0
  158. package/src/acl/revoke/0.1/payload.ts +1 -1
  159. package/src/acl/revoke/0.2/payload.ts +1122 -0
  160. package/src/acl/show/0.1/payload.ts +1 -1
  161. package/src/acl/show/0.2/payload.ts +1016 -0
  162. package/src/acl/swap-key/0.1/payload.ts +1 -1
  163. package/src/acl/update/0.1/payload.ts +1 -1
  164. package/src/acl/update/0.2/payload.ts +1094 -0
  165. package/src/auth/step-up/approve-request/0.4/payload.ts +461 -0
  166. package/src/auth/step-up/approve-response/0.6/payload.ts +648 -0
  167. package/src/auth/step-up/approver/_shared/0.1/approver.ts +17 -0
  168. package/src/auth/step-up/approver/attest/0.1/payload.ts +135 -0
  169. package/src/auth/step-up/approver/enroll/0.1/payload.ts +329 -0
  170. package/src/auth/step-up/approver/invite/0.1/payload.ts +258 -0
  171. package/src/auth/step-up/approver/list/0.1/payload.ts +318 -0
  172. package/src/auth/step-up/approver/redeem/finish/0.1/payload.ts +337 -0
  173. package/src/auth/step-up/approver/redeem/start/0.1/payload.ts +241 -0
  174. package/src/auth/step-up/approver/revoke/0.1/payload.ts +352 -0
  175. package/src/index.ts +31 -0
  176. package/src/task-consent/decision/0.2/payload.ts +537 -0
  177. package/src/vtc/admin/actions/_shared/0.1/action.ts +25 -0
  178. package/src/vtc/admin/actions/acknowledge/0.1/payload.ts +671 -0
  179. package/src/vtc/admin/actions/cancel/0.1/payload.ts +680 -0
  180. package/src/vtc/admin/actions/list/0.1/payload.ts +795 -0
  181. package/src/vtc/admin/actions/show/0.1/payload.ts +671 -0
  182. package/src/vtc/install/claim/finish/0.3/payload.ts +253 -0
  183. package/src/vtc/install/claim/start/0.3/payload.ts +256 -0
  184. package/src/vtc/members/authority-reduced-notice/0.1/payload.ts +162 -0
  185. package/src/vtc/roles/_shared/0.1/role.ts +17 -0
  186. package/src/vtc/roles/define/0.1/payload.ts +435 -0
  187. package/src/vtc/roles/delete/0.1/payload.ts +200 -0
  188. package/src/vtc/roles/list/0.1/payload.ts +389 -0
  189. package/src/vtc/roles/show/0.1/payload.ts +399 -0
@@ -0,0 +1,775 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/task-consent/decision/0.2/payload.schema.json
4
+ */
5
+ import type { AuthenticatorAssertionResponseLogin, Decision, DigestMultibase, Ext } from "../../../_shared/components.js";
6
+ /**
7
+ * An additional factor backing the decision, tagged on `kind`. It never replaces the document's proof — that proof is still REQUIRED and is by the approver's own DID — and it is verified by the executor on top of it. Absent, the proof alone is the authorization, exactly as in 0.1.
8
+ */
9
+ export type DecisionEvidence = WebAuthn | ApproverSigned;
10
+ /**
11
+ * 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, and it is always made by the approver's own DID. Additive over 0.1: an OPTIONAL `evidence` member carries an additional factor (a WebAuthn assertion, or a signed step-up approver statement) the executor verifies on top of the proof, and an OPTIONAL `actionId` links the decision to a Verifiable Trust Community action (vtc/admin/actions/list/0.1). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
12
+ */
13
+ export interface TaskConsentDecisionPayload {
14
+ /**
15
+ * Echoes the challenge of the pending request this decision answers — a task-consent/request's `challenge`, or the `challenge` on a VTC action the approver may decide — binding the decision to that one pending request and that one approver. 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.
16
+ */
17
+ challenge: string;
18
+ /**
19
+ * Echoes the challenge-salted digest of the task being authorized, in the encoding the pending 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.
20
+ */
21
+ payloadDigest: DigestMultibase;
22
+ decision: Decision;
23
+ /**
24
+ * OPTIONAL human-facing note, most useful on a `deny`.
25
+ */
26
+ reason?: string;
27
+ /**
28
+ * OPTIONAL identifier of the Verifiable Trust Community action (vtc/admin/actions/_shared/0.1 ActionId) this decision answers. A locator only: the executor finds the pending request by `payloadDigest` and checks `challenge` against it exactly as without this member, and refuses a decision whose `actionId` names a different action than the one those resolve to.
29
+ */
30
+ actionId?: string;
31
+ evidence?: DecisionEvidence;
32
+ ext?: Ext;
33
+ }
34
+ export interface WebAuthn {
35
+ kind: "webauthn";
36
+ /**
37
+ * The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API, the same shape auth/step-up/approve-response/0.5 carries. The WebAuthn challenge the approver's client passed to the authenticator MUST be the UTF-8 bytes of this decision's `challenge` value, so `clientDataJSON.challenge` is their base64url (no padding) encoding; the executor, as relying party, verifies it per WebAuthn Level 2 §7.2 against a credential enrolled to the approver whose DID made the document's proof. The commitment to the payload is the executor's binding: it issued that challenge for exactly one pending request, whose `payloadDigest` is salted with it.
38
+ */
39
+ assertion: AuthenticatorAssertionResponseLogin;
40
+ }
41
+ export interface ApproverSigned {
42
+ kind: "approverSigned";
43
+ /**
44
+ * A complete, signed https://trusttasks.org/spec/auth/step-up/approver/attest/0.1 Trust Task document whose `purpose` is `decision`, issued by a step-up approver enrolled to the decision's signer: its `subject` is the DID that made this document's proof, its `audience` the executor, its `challenge` this decision's `challenge`, and its `boundTo` this decision's `payloadDigest`. The executor verifies it as a document in its own right — envelope, proof and payload against that specification's schemas — and over its members exactly as received: its proof covers every member, including ones this schema does not name, so it is deliberately an open object here rather than a typed one a binding could narrow.
45
+ */
46
+ statement: {};
47
+ }
48
+ /**
49
+ * Acknowledgement of the recorded decision, and whether the approval threshold is now met.
50
+ */
51
+ export interface TaskConsentDecisionResponsePayload {
52
+ /**
53
+ * `granted` = the threshold is met: the requester's re-submit will now execute, or — for a VTC action — the executor has executed (or is executing) the parked operation itself. `pending` = the approval was recorded but more are needed. `denied` = the request was aborted.
54
+ */
55
+ status: "granted" | "pending" | "denied";
56
+ /**
57
+ * The digest this decision concerned, in the encoding the pending request carried it.
58
+ */
59
+ payloadDigest: DigestMultibase;
60
+ /**
61
+ * Echoed when the decision carried one.
62
+ */
63
+ actionId?: string;
64
+ /**
65
+ * Distinct approvals recorded so far.
66
+ */
67
+ approvals?: number;
68
+ /**
69
+ * Distinct approvals required. Present when status is `pending`.
70
+ */
71
+ needed?: number;
72
+ ext?: Ext;
73
+ }
74
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
75
+ export type { AuthenticatorAssertionResponseLogin, Decision, DigestMultibase, Ext };
76
+ /** Trust Task type URI. */
77
+ export declare const TYPE_URI: "https://trusttasks.org/spec/task-consent/decision/0.2";
78
+ /** Stable alias for this specification's request payload shape. */
79
+ export type Payload = TaskConsentDecisionPayload;
80
+ /** Trust Task response type URI (request type URI + "#response"). */
81
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/task-consent/decision/0.2#response";
82
+ /** Stable alias for this specification's success-response payload shape. */
83
+ export type Response = TaskConsentDecisionResponsePayload;
84
+ /**
85
+ * This specification's payload schema, as a value.
86
+ *
87
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
88
+ * rather than only as a `.json` file because TypeScript types are erased
89
+ * at runtime: without a schema a consumer has nothing to validate, and
90
+ * every REQUIRED payload member is optional in practice. Cross-file
91
+ * `$ref`s are already inlined, so it needs no resolver.
92
+ */
93
+ export declare const PAYLOAD_SCHEMA: {
94
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
95
+ readonly $id: "https://trusttasks.org/spec/task-consent/decision/0.2";
96
+ readonly title: "Task Consent Decision — payload";
97
+ readonly description: "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, and it is always made by the approver's own DID. Additive over 0.1: an OPTIONAL `evidence` member carries an additional factor (a WebAuthn assertion, or a signed step-up approver statement) the executor verifies on top of the proof, and an OPTIONAL `actionId` links the decision to a Verifiable Trust Community action (vtc/admin/actions/list/0.1). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
98
+ readonly type: "object";
99
+ readonly additionalProperties: false;
100
+ readonly required: readonly ["challenge", "payloadDigest", "decision"];
101
+ readonly properties: {
102
+ readonly challenge: {
103
+ readonly type: "string";
104
+ readonly minLength: 16;
105
+ readonly description: "Echoes the challenge of the pending request this decision answers — a task-consent/request's `challenge`, or the `challenge` on a VTC action the approver may decide — binding the decision to that one pending request and that one approver. 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.";
106
+ };
107
+ readonly payloadDigest: {
108
+ readonly $ref: "#/$defs/DigestMultibase";
109
+ readonly description: "Echoes the challenge-salted digest of the task being authorized, in the encoding the pending 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.";
110
+ };
111
+ readonly decision: {
112
+ readonly $ref: "#/$defs/Decision";
113
+ };
114
+ readonly reason: {
115
+ readonly type: "string";
116
+ readonly maxLength: 500;
117
+ readonly description: "OPTIONAL human-facing note, most useful on a `deny`.";
118
+ };
119
+ readonly actionId: {
120
+ readonly type: "string";
121
+ readonly minLength: 1;
122
+ readonly maxLength: 128;
123
+ readonly description: "OPTIONAL identifier of the Verifiable Trust Community action (vtc/admin/actions/_shared/0.1 ActionId) this decision answers. A locator only: the executor finds the pending request by `payloadDigest` and checks `challenge` against it exactly as without this member, and refuses a decision whose `actionId` names a different action than the one those resolve to.";
124
+ };
125
+ readonly evidence: {
126
+ readonly $ref: "#/$defs/Evidence";
127
+ };
128
+ readonly ext: {
129
+ readonly $ref: "#/$defs/Ext";
130
+ };
131
+ };
132
+ readonly $defs: {
133
+ readonly Evidence: {
134
+ readonly $anchor: "evidence";
135
+ readonly title: "Decision Evidence";
136
+ readonly description: "An additional factor backing the decision, tagged on `kind`. It never replaces the document's proof — that proof is still REQUIRED and is by the approver's own DID — and it is verified by the executor on top of it. Absent, the proof alone is the authorization, exactly as in 0.1.";
137
+ readonly oneOf: readonly [{
138
+ readonly title: "WebAuthn";
139
+ readonly type: "object";
140
+ readonly additionalProperties: false;
141
+ readonly required: readonly ["kind", "assertion"];
142
+ readonly properties: {
143
+ readonly kind: {
144
+ readonly const: "webauthn";
145
+ };
146
+ readonly assertion: {
147
+ readonly $ref: "#/$defs/AssertionResponse";
148
+ readonly description: "The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API, the same shape auth/step-up/approve-response/0.5 carries. The WebAuthn challenge the approver's client passed to the authenticator MUST be the UTF-8 bytes of this decision's `challenge` value, so `clientDataJSON.challenge` is their base64url (no padding) encoding; the executor, as relying party, verifies it per WebAuthn Level 2 §7.2 against a credential enrolled to the approver whose DID made the document's proof. The commitment to the payload is the executor's binding: it issued that challenge for exactly one pending request, whose `payloadDigest` is salted with it.";
149
+ };
150
+ };
151
+ }, {
152
+ readonly title: "ApproverSigned";
153
+ readonly type: "object";
154
+ readonly additionalProperties: false;
155
+ readonly required: readonly ["kind", "statement"];
156
+ readonly properties: {
157
+ readonly kind: {
158
+ readonly const: "approverSigned";
159
+ };
160
+ readonly statement: {
161
+ readonly type: "object";
162
+ readonly description: "A complete, signed https://trusttasks.org/spec/auth/step-up/approver/attest/0.1 Trust Task document whose `purpose` is `decision`, issued by a step-up approver enrolled to the decision's signer: its `subject` is the DID that made this document's proof, its `audience` the executor, its `challenge` this decision's `challenge`, and its `boundTo` this decision's `payloadDigest`. The executor verifies it as a document in its own right — envelope, proof and payload against that specification's schemas — and over its members exactly as received: its proof covers every member, including ones this schema does not name, so it is deliberately an open object here rather than a typed one a binding could narrow.";
163
+ };
164
+ };
165
+ }];
166
+ };
167
+ readonly Response: {
168
+ readonly $anchor: "response";
169
+ readonly title: "Task Consent Decision — response payload";
170
+ readonly description: "Acknowledgement of the recorded decision, and whether the approval threshold is now met.";
171
+ readonly type: "object";
172
+ readonly additionalProperties: false;
173
+ readonly required: readonly ["status", "payloadDigest"];
174
+ readonly properties: {
175
+ readonly status: {
176
+ readonly type: "string";
177
+ readonly enum: readonly ["granted", "pending", "denied"];
178
+ readonly description: "`granted` = the threshold is met: the requester's re-submit will now execute, or — for a VTC action — the executor has executed (or is executing) the parked operation itself. `pending` = the approval was recorded but more are needed. `denied` = the request was aborted.";
179
+ };
180
+ readonly payloadDigest: {
181
+ readonly $ref: "#/$defs/DigestMultibase";
182
+ readonly description: "The digest this decision concerned, in the encoding the pending request carried it.";
183
+ };
184
+ readonly actionId: {
185
+ readonly type: "string";
186
+ readonly minLength: 1;
187
+ readonly maxLength: 128;
188
+ readonly description: "Echoed when the decision carried one.";
189
+ };
190
+ readonly approvals: {
191
+ readonly type: "integer";
192
+ readonly minimum: 0;
193
+ readonly description: "Distinct approvals recorded so far.";
194
+ };
195
+ readonly needed: {
196
+ readonly type: "integer";
197
+ readonly minimum: 1;
198
+ readonly description: "Distinct approvals required. Present when status is `pending`.";
199
+ };
200
+ readonly ext: {
201
+ readonly $ref: "#/$defs/Ext";
202
+ };
203
+ };
204
+ };
205
+ readonly Ext: {
206
+ readonly title: "Ext";
207
+ readonly description: "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.";
208
+ readonly type: "object";
209
+ readonly minProperties: 1;
210
+ readonly additionalProperties: true;
211
+ readonly propertyNames: {
212
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
213
+ };
214
+ };
215
+ readonly DigestMultibase: {
216
+ readonly title: "DigestMultibase";
217
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
218
+ readonly type: "string";
219
+ readonly minLength: 16;
220
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
221
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
222
+ };
223
+ readonly AssertionResponse: {
224
+ readonly $anchor: "assertionResponse";
225
+ readonly title: "AuthenticatorAssertionResponse (login)";
226
+ readonly description: "The credential the client returns from `navigator.credentials.get`. Binary fields are base64url-encoded.";
227
+ readonly type: "object";
228
+ readonly additionalProperties: false;
229
+ readonly required: readonly ["id", "rawId", "type", "response"];
230
+ readonly properties: {
231
+ readonly id: {
232
+ readonly type: "string";
233
+ };
234
+ readonly rawId: {
235
+ readonly type: "string";
236
+ };
237
+ readonly type: {
238
+ readonly const: "public-key";
239
+ };
240
+ readonly response: {
241
+ readonly type: "object";
242
+ readonly additionalProperties: false;
243
+ readonly required: readonly ["clientDataJSON", "authenticatorData", "signature"];
244
+ readonly properties: {
245
+ readonly clientDataJSON: {
246
+ readonly type: "string";
247
+ };
248
+ readonly authenticatorData: {
249
+ readonly type: "string";
250
+ };
251
+ readonly signature: {
252
+ readonly type: "string";
253
+ };
254
+ readonly userHandle: {
255
+ readonly type: readonly ["string", "null"];
256
+ };
257
+ };
258
+ };
259
+ readonly authenticatorAttachment: {
260
+ readonly enum: readonly ["platform", "cross-platform"];
261
+ };
262
+ readonly clientExtensionResults: {
263
+ readonly type: "object";
264
+ };
265
+ };
266
+ };
267
+ readonly Decision: {
268
+ readonly title: "Decision";
269
+ readonly type: "string";
270
+ readonly enum: readonly ["approve", "deny"];
271
+ readonly description: "The approver's answer. `deny` aborts the pending request; a subsequent submit of the same task starts a fresh one.";
272
+ };
273
+ };
274
+ };
275
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
276
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
277
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
278
+ readonly $ref: "#/$defs/Response";
279
+ readonly $defs: {
280
+ readonly Evidence: {
281
+ readonly $anchor: "evidence";
282
+ readonly title: "Decision Evidence";
283
+ readonly description: "An additional factor backing the decision, tagged on `kind`. It never replaces the document's proof — that proof is still REQUIRED and is by the approver's own DID — and it is verified by the executor on top of it. Absent, the proof alone is the authorization, exactly as in 0.1.";
284
+ readonly oneOf: readonly [{
285
+ readonly title: "WebAuthn";
286
+ readonly type: "object";
287
+ readonly additionalProperties: false;
288
+ readonly required: readonly ["kind", "assertion"];
289
+ readonly properties: {
290
+ readonly kind: {
291
+ readonly const: "webauthn";
292
+ };
293
+ readonly assertion: {
294
+ readonly $ref: "#/$defs/AssertionResponse";
295
+ readonly description: "The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API, the same shape auth/step-up/approve-response/0.5 carries. The WebAuthn challenge the approver's client passed to the authenticator MUST be the UTF-8 bytes of this decision's `challenge` value, so `clientDataJSON.challenge` is their base64url (no padding) encoding; the executor, as relying party, verifies it per WebAuthn Level 2 §7.2 against a credential enrolled to the approver whose DID made the document's proof. The commitment to the payload is the executor's binding: it issued that challenge for exactly one pending request, whose `payloadDigest` is salted with it.";
296
+ };
297
+ };
298
+ }, {
299
+ readonly title: "ApproverSigned";
300
+ readonly type: "object";
301
+ readonly additionalProperties: false;
302
+ readonly required: readonly ["kind", "statement"];
303
+ readonly properties: {
304
+ readonly kind: {
305
+ readonly const: "approverSigned";
306
+ };
307
+ readonly statement: {
308
+ readonly type: "object";
309
+ readonly description: "A complete, signed https://trusttasks.org/spec/auth/step-up/approver/attest/0.1 Trust Task document whose `purpose` is `decision`, issued by a step-up approver enrolled to the decision's signer: its `subject` is the DID that made this document's proof, its `audience` the executor, its `challenge` this decision's `challenge`, and its `boundTo` this decision's `payloadDigest`. The executor verifies it as a document in its own right — envelope, proof and payload against that specification's schemas — and over its members exactly as received: its proof covers every member, including ones this schema does not name, so it is deliberately an open object here rather than a typed one a binding could narrow.";
310
+ };
311
+ };
312
+ }];
313
+ };
314
+ readonly Response: {
315
+ readonly $anchor: "response";
316
+ readonly title: "Task Consent Decision — response payload";
317
+ readonly description: "Acknowledgement of the recorded decision, and whether the approval threshold is now met.";
318
+ readonly type: "object";
319
+ readonly additionalProperties: false;
320
+ readonly required: readonly ["status", "payloadDigest"];
321
+ readonly properties: {
322
+ readonly status: {
323
+ readonly type: "string";
324
+ readonly enum: readonly ["granted", "pending", "denied"];
325
+ readonly description: "`granted` = the threshold is met: the requester's re-submit will now execute, or — for a VTC action — the executor has executed (or is executing) the parked operation itself. `pending` = the approval was recorded but more are needed. `denied` = the request was aborted.";
326
+ };
327
+ readonly payloadDigest: {
328
+ readonly $ref: "#/$defs/DigestMultibase";
329
+ readonly description: "The digest this decision concerned, in the encoding the pending request carried it.";
330
+ };
331
+ readonly actionId: {
332
+ readonly type: "string";
333
+ readonly minLength: 1;
334
+ readonly maxLength: 128;
335
+ readonly description: "Echoed when the decision carried one.";
336
+ };
337
+ readonly approvals: {
338
+ readonly type: "integer";
339
+ readonly minimum: 0;
340
+ readonly description: "Distinct approvals recorded so far.";
341
+ };
342
+ readonly needed: {
343
+ readonly type: "integer";
344
+ readonly minimum: 1;
345
+ readonly description: "Distinct approvals required. Present when status is `pending`.";
346
+ };
347
+ readonly ext: {
348
+ readonly $ref: "#/$defs/Ext";
349
+ };
350
+ };
351
+ };
352
+ readonly Ext: {
353
+ readonly title: "Ext";
354
+ readonly description: "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.";
355
+ readonly type: "object";
356
+ readonly minProperties: 1;
357
+ readonly additionalProperties: true;
358
+ readonly propertyNames: {
359
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
360
+ };
361
+ };
362
+ readonly DigestMultibase: {
363
+ readonly title: "DigestMultibase";
364
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
365
+ readonly type: "string";
366
+ readonly minLength: 16;
367
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
368
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
369
+ };
370
+ readonly AssertionResponse: {
371
+ readonly $anchor: "assertionResponse";
372
+ readonly title: "AuthenticatorAssertionResponse (login)";
373
+ readonly description: "The credential the client returns from `navigator.credentials.get`. Binary fields are base64url-encoded.";
374
+ readonly type: "object";
375
+ readonly additionalProperties: false;
376
+ readonly required: readonly ["id", "rawId", "type", "response"];
377
+ readonly properties: {
378
+ readonly id: {
379
+ readonly type: "string";
380
+ };
381
+ readonly rawId: {
382
+ readonly type: "string";
383
+ };
384
+ readonly type: {
385
+ readonly const: "public-key";
386
+ };
387
+ readonly response: {
388
+ readonly type: "object";
389
+ readonly additionalProperties: false;
390
+ readonly required: readonly ["clientDataJSON", "authenticatorData", "signature"];
391
+ readonly properties: {
392
+ readonly clientDataJSON: {
393
+ readonly type: "string";
394
+ };
395
+ readonly authenticatorData: {
396
+ readonly type: "string";
397
+ };
398
+ readonly signature: {
399
+ readonly type: "string";
400
+ };
401
+ readonly userHandle: {
402
+ readonly type: readonly ["string", "null"];
403
+ };
404
+ };
405
+ };
406
+ readonly authenticatorAttachment: {
407
+ readonly enum: readonly ["platform", "cross-platform"];
408
+ };
409
+ readonly clientExtensionResults: {
410
+ readonly type: "object";
411
+ };
412
+ };
413
+ };
414
+ readonly Decision: {
415
+ readonly title: "Decision";
416
+ readonly type: "string";
417
+ readonly enum: readonly ["approve", "deny"];
418
+ readonly description: "The approver's answer. `deny` aborts the pending request; a subsequent submit of the same task starts a fresh one.";
419
+ };
420
+ };
421
+ };
422
+ /**
423
+ * SPEC.md §7.2 policy for the request variant, from this specification's
424
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
425
+ * per-specification and cannot be derived from the document alone, and
426
+ * item 2 needs the schema this carries.
427
+ */
428
+ export declare const SPEC: {
429
+ readonly typeUri: "https://trusttasks.org/spec/task-consent/decision/0.2";
430
+ readonly isBearer: false;
431
+ readonly isProofRequired: true;
432
+ readonly isRecipientRequired: true;
433
+ readonly isIssuedAtRequired: true;
434
+ readonly payloadSchema: {
435
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
436
+ readonly $id: "https://trusttasks.org/spec/task-consent/decision/0.2";
437
+ readonly title: "Task Consent Decision — payload";
438
+ readonly description: "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, and it is always made by the approver's own DID. Additive over 0.1: an OPTIONAL `evidence` member carries an additional factor (a WebAuthn assertion, or a signed step-up approver statement) the executor verifies on top of the proof, and an OPTIONAL `actionId` links the decision to a Verifiable Trust Community action (vtc/admin/actions/list/0.1). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
439
+ readonly type: "object";
440
+ readonly additionalProperties: false;
441
+ readonly required: readonly ["challenge", "payloadDigest", "decision"];
442
+ readonly properties: {
443
+ readonly challenge: {
444
+ readonly type: "string";
445
+ readonly minLength: 16;
446
+ readonly description: "Echoes the challenge of the pending request this decision answers — a task-consent/request's `challenge`, or the `challenge` on a VTC action the approver may decide — binding the decision to that one pending request and that one approver. 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.";
447
+ };
448
+ readonly payloadDigest: {
449
+ readonly $ref: "#/$defs/DigestMultibase";
450
+ readonly description: "Echoes the challenge-salted digest of the task being authorized, in the encoding the pending 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.";
451
+ };
452
+ readonly decision: {
453
+ readonly $ref: "#/$defs/Decision";
454
+ };
455
+ readonly reason: {
456
+ readonly type: "string";
457
+ readonly maxLength: 500;
458
+ readonly description: "OPTIONAL human-facing note, most useful on a `deny`.";
459
+ };
460
+ readonly actionId: {
461
+ readonly type: "string";
462
+ readonly minLength: 1;
463
+ readonly maxLength: 128;
464
+ readonly description: "OPTIONAL identifier of the Verifiable Trust Community action (vtc/admin/actions/_shared/0.1 ActionId) this decision answers. A locator only: the executor finds the pending request by `payloadDigest` and checks `challenge` against it exactly as without this member, and refuses a decision whose `actionId` names a different action than the one those resolve to.";
465
+ };
466
+ readonly evidence: {
467
+ readonly $ref: "#/$defs/Evidence";
468
+ };
469
+ readonly ext: {
470
+ readonly $ref: "#/$defs/Ext";
471
+ };
472
+ };
473
+ readonly $defs: {
474
+ readonly Evidence: {
475
+ readonly $anchor: "evidence";
476
+ readonly title: "Decision Evidence";
477
+ readonly description: "An additional factor backing the decision, tagged on `kind`. It never replaces the document's proof — that proof is still REQUIRED and is by the approver's own DID — and it is verified by the executor on top of it. Absent, the proof alone is the authorization, exactly as in 0.1.";
478
+ readonly oneOf: readonly [{
479
+ readonly title: "WebAuthn";
480
+ readonly type: "object";
481
+ readonly additionalProperties: false;
482
+ readonly required: readonly ["kind", "assertion"];
483
+ readonly properties: {
484
+ readonly kind: {
485
+ readonly const: "webauthn";
486
+ };
487
+ readonly assertion: {
488
+ readonly $ref: "#/$defs/AssertionResponse";
489
+ readonly description: "The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API, the same shape auth/step-up/approve-response/0.5 carries. The WebAuthn challenge the approver's client passed to the authenticator MUST be the UTF-8 bytes of this decision's `challenge` value, so `clientDataJSON.challenge` is their base64url (no padding) encoding; the executor, as relying party, verifies it per WebAuthn Level 2 §7.2 against a credential enrolled to the approver whose DID made the document's proof. The commitment to the payload is the executor's binding: it issued that challenge for exactly one pending request, whose `payloadDigest` is salted with it.";
490
+ };
491
+ };
492
+ }, {
493
+ readonly title: "ApproverSigned";
494
+ readonly type: "object";
495
+ readonly additionalProperties: false;
496
+ readonly required: readonly ["kind", "statement"];
497
+ readonly properties: {
498
+ readonly kind: {
499
+ readonly const: "approverSigned";
500
+ };
501
+ readonly statement: {
502
+ readonly type: "object";
503
+ readonly description: "A complete, signed https://trusttasks.org/spec/auth/step-up/approver/attest/0.1 Trust Task document whose `purpose` is `decision`, issued by a step-up approver enrolled to the decision's signer: its `subject` is the DID that made this document's proof, its `audience` the executor, its `challenge` this decision's `challenge`, and its `boundTo` this decision's `payloadDigest`. The executor verifies it as a document in its own right — envelope, proof and payload against that specification's schemas — and over its members exactly as received: its proof covers every member, including ones this schema does not name, so it is deliberately an open object here rather than a typed one a binding could narrow.";
504
+ };
505
+ };
506
+ }];
507
+ };
508
+ readonly Response: {
509
+ readonly $anchor: "response";
510
+ readonly title: "Task Consent Decision — response payload";
511
+ readonly description: "Acknowledgement of the recorded decision, and whether the approval threshold is now met.";
512
+ readonly type: "object";
513
+ readonly additionalProperties: false;
514
+ readonly required: readonly ["status", "payloadDigest"];
515
+ readonly properties: {
516
+ readonly status: {
517
+ readonly type: "string";
518
+ readonly enum: readonly ["granted", "pending", "denied"];
519
+ readonly description: "`granted` = the threshold is met: the requester's re-submit will now execute, or — for a VTC action — the executor has executed (or is executing) the parked operation itself. `pending` = the approval was recorded but more are needed. `denied` = the request was aborted.";
520
+ };
521
+ readonly payloadDigest: {
522
+ readonly $ref: "#/$defs/DigestMultibase";
523
+ readonly description: "The digest this decision concerned, in the encoding the pending request carried it.";
524
+ };
525
+ readonly actionId: {
526
+ readonly type: "string";
527
+ readonly minLength: 1;
528
+ readonly maxLength: 128;
529
+ readonly description: "Echoed when the decision carried one.";
530
+ };
531
+ readonly approvals: {
532
+ readonly type: "integer";
533
+ readonly minimum: 0;
534
+ readonly description: "Distinct approvals recorded so far.";
535
+ };
536
+ readonly needed: {
537
+ readonly type: "integer";
538
+ readonly minimum: 1;
539
+ readonly description: "Distinct approvals required. Present when status is `pending`.";
540
+ };
541
+ readonly ext: {
542
+ readonly $ref: "#/$defs/Ext";
543
+ };
544
+ };
545
+ };
546
+ readonly Ext: {
547
+ readonly title: "Ext";
548
+ readonly description: "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.";
549
+ readonly type: "object";
550
+ readonly minProperties: 1;
551
+ readonly additionalProperties: true;
552
+ readonly propertyNames: {
553
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
554
+ };
555
+ };
556
+ readonly DigestMultibase: {
557
+ readonly title: "DigestMultibase";
558
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
559
+ readonly type: "string";
560
+ readonly minLength: 16;
561
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
562
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
563
+ };
564
+ readonly AssertionResponse: {
565
+ readonly $anchor: "assertionResponse";
566
+ readonly title: "AuthenticatorAssertionResponse (login)";
567
+ readonly description: "The credential the client returns from `navigator.credentials.get`. Binary fields are base64url-encoded.";
568
+ readonly type: "object";
569
+ readonly additionalProperties: false;
570
+ readonly required: readonly ["id", "rawId", "type", "response"];
571
+ readonly properties: {
572
+ readonly id: {
573
+ readonly type: "string";
574
+ };
575
+ readonly rawId: {
576
+ readonly type: "string";
577
+ };
578
+ readonly type: {
579
+ readonly const: "public-key";
580
+ };
581
+ readonly response: {
582
+ readonly type: "object";
583
+ readonly additionalProperties: false;
584
+ readonly required: readonly ["clientDataJSON", "authenticatorData", "signature"];
585
+ readonly properties: {
586
+ readonly clientDataJSON: {
587
+ readonly type: "string";
588
+ };
589
+ readonly authenticatorData: {
590
+ readonly type: "string";
591
+ };
592
+ readonly signature: {
593
+ readonly type: "string";
594
+ };
595
+ readonly userHandle: {
596
+ readonly type: readonly ["string", "null"];
597
+ };
598
+ };
599
+ };
600
+ readonly authenticatorAttachment: {
601
+ readonly enum: readonly ["platform", "cross-platform"];
602
+ };
603
+ readonly clientExtensionResults: {
604
+ readonly type: "object";
605
+ };
606
+ };
607
+ };
608
+ readonly Decision: {
609
+ readonly title: "Decision";
610
+ readonly type: "string";
611
+ readonly enum: readonly ["approve", "deny"];
612
+ readonly description: "The approver's answer. `deny` aborts the pending request; a subsequent submit of the same task starts a fresh one.";
613
+ };
614
+ };
615
+ };
616
+ };
617
+ /**
618
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
619
+ * tracks the *issuer* party's requirement because a response swaps the
620
+ * parties (§7.3 item 5).
621
+ */
622
+ export declare const RESPONSE_SPEC: {
623
+ readonly typeUri: "https://trusttasks.org/spec/task-consent/decision/0.2#response";
624
+ readonly isBearer: false;
625
+ readonly isProofRequired: true;
626
+ readonly isRecipientRequired: true;
627
+ readonly isIssuedAtRequired: true;
628
+ readonly payloadSchema: {
629
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
630
+ readonly $ref: "#/$defs/Response";
631
+ readonly $defs: {
632
+ readonly Evidence: {
633
+ readonly $anchor: "evidence";
634
+ readonly title: "Decision Evidence";
635
+ readonly description: "An additional factor backing the decision, tagged on `kind`. It never replaces the document's proof — that proof is still REQUIRED and is by the approver's own DID — and it is verified by the executor on top of it. Absent, the proof alone is the authorization, exactly as in 0.1.";
636
+ readonly oneOf: readonly [{
637
+ readonly title: "WebAuthn";
638
+ readonly type: "object";
639
+ readonly additionalProperties: false;
640
+ readonly required: readonly ["kind", "assertion"];
641
+ readonly properties: {
642
+ readonly kind: {
643
+ readonly const: "webauthn";
644
+ };
645
+ readonly assertion: {
646
+ readonly $ref: "#/$defs/AssertionResponse";
647
+ readonly description: "The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API, the same shape auth/step-up/approve-response/0.5 carries. The WebAuthn challenge the approver's client passed to the authenticator MUST be the UTF-8 bytes of this decision's `challenge` value, so `clientDataJSON.challenge` is their base64url (no padding) encoding; the executor, as relying party, verifies it per WebAuthn Level 2 §7.2 against a credential enrolled to the approver whose DID made the document's proof. The commitment to the payload is the executor's binding: it issued that challenge for exactly one pending request, whose `payloadDigest` is salted with it.";
648
+ };
649
+ };
650
+ }, {
651
+ readonly title: "ApproverSigned";
652
+ readonly type: "object";
653
+ readonly additionalProperties: false;
654
+ readonly required: readonly ["kind", "statement"];
655
+ readonly properties: {
656
+ readonly kind: {
657
+ readonly const: "approverSigned";
658
+ };
659
+ readonly statement: {
660
+ readonly type: "object";
661
+ readonly description: "A complete, signed https://trusttasks.org/spec/auth/step-up/approver/attest/0.1 Trust Task document whose `purpose` is `decision`, issued by a step-up approver enrolled to the decision's signer: its `subject` is the DID that made this document's proof, its `audience` the executor, its `challenge` this decision's `challenge`, and its `boundTo` this decision's `payloadDigest`. The executor verifies it as a document in its own right — envelope, proof and payload against that specification's schemas — and over its members exactly as received: its proof covers every member, including ones this schema does not name, so it is deliberately an open object here rather than a typed one a binding could narrow.";
662
+ };
663
+ };
664
+ }];
665
+ };
666
+ readonly Response: {
667
+ readonly $anchor: "response";
668
+ readonly title: "Task Consent Decision — response payload";
669
+ readonly description: "Acknowledgement of the recorded decision, and whether the approval threshold is now met.";
670
+ readonly type: "object";
671
+ readonly additionalProperties: false;
672
+ readonly required: readonly ["status", "payloadDigest"];
673
+ readonly properties: {
674
+ readonly status: {
675
+ readonly type: "string";
676
+ readonly enum: readonly ["granted", "pending", "denied"];
677
+ readonly description: "`granted` = the threshold is met: the requester's re-submit will now execute, or — for a VTC action — the executor has executed (or is executing) the parked operation itself. `pending` = the approval was recorded but more are needed. `denied` = the request was aborted.";
678
+ };
679
+ readonly payloadDigest: {
680
+ readonly $ref: "#/$defs/DigestMultibase";
681
+ readonly description: "The digest this decision concerned, in the encoding the pending request carried it.";
682
+ };
683
+ readonly actionId: {
684
+ readonly type: "string";
685
+ readonly minLength: 1;
686
+ readonly maxLength: 128;
687
+ readonly description: "Echoed when the decision carried one.";
688
+ };
689
+ readonly approvals: {
690
+ readonly type: "integer";
691
+ readonly minimum: 0;
692
+ readonly description: "Distinct approvals recorded so far.";
693
+ };
694
+ readonly needed: {
695
+ readonly type: "integer";
696
+ readonly minimum: 1;
697
+ readonly description: "Distinct approvals required. Present when status is `pending`.";
698
+ };
699
+ readonly ext: {
700
+ readonly $ref: "#/$defs/Ext";
701
+ };
702
+ };
703
+ };
704
+ readonly Ext: {
705
+ readonly title: "Ext";
706
+ readonly description: "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.";
707
+ readonly type: "object";
708
+ readonly minProperties: 1;
709
+ readonly additionalProperties: true;
710
+ readonly propertyNames: {
711
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
712
+ };
713
+ };
714
+ readonly DigestMultibase: {
715
+ readonly title: "DigestMultibase";
716
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
717
+ readonly type: "string";
718
+ readonly minLength: 16;
719
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
720
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
721
+ };
722
+ readonly AssertionResponse: {
723
+ readonly $anchor: "assertionResponse";
724
+ readonly title: "AuthenticatorAssertionResponse (login)";
725
+ readonly description: "The credential the client returns from `navigator.credentials.get`. Binary fields are base64url-encoded.";
726
+ readonly type: "object";
727
+ readonly additionalProperties: false;
728
+ readonly required: readonly ["id", "rawId", "type", "response"];
729
+ readonly properties: {
730
+ readonly id: {
731
+ readonly type: "string";
732
+ };
733
+ readonly rawId: {
734
+ readonly type: "string";
735
+ };
736
+ readonly type: {
737
+ readonly const: "public-key";
738
+ };
739
+ readonly response: {
740
+ readonly type: "object";
741
+ readonly additionalProperties: false;
742
+ readonly required: readonly ["clientDataJSON", "authenticatorData", "signature"];
743
+ readonly properties: {
744
+ readonly clientDataJSON: {
745
+ readonly type: "string";
746
+ };
747
+ readonly authenticatorData: {
748
+ readonly type: "string";
749
+ };
750
+ readonly signature: {
751
+ readonly type: "string";
752
+ };
753
+ readonly userHandle: {
754
+ readonly type: readonly ["string", "null"];
755
+ };
756
+ };
757
+ };
758
+ readonly authenticatorAttachment: {
759
+ readonly enum: readonly ["platform", "cross-platform"];
760
+ };
761
+ readonly clientExtensionResults: {
762
+ readonly type: "object";
763
+ };
764
+ };
765
+ };
766
+ readonly Decision: {
767
+ readonly title: "Decision";
768
+ readonly type: "string";
769
+ readonly enum: readonly ["approve", "deny"];
770
+ readonly description: "The approver's answer. `deny` aborts the pending request; a subsequent submit of the same task starts a fresh one.";
771
+ };
772
+ };
773
+ };
774
+ };
775
+ //# sourceMappingURL=payload.d.ts.map