@openvtc/trust-tasks 0.16.9 → 0.16.10

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 (166) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/dist/_shared/components.d.ts +204 -5
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +27 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +27 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
  9. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
  10. package/dist/persona/_shared/0.1/persona-record.js +6 -0
  11. package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
  12. package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
  13. package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
  14. package/dist/persona/attribute/delete/1.0/payload.js +188 -0
  15. package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
  16. package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
  17. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
  18. package/dist/persona/attribute/list/1.0/payload.js +532 -0
  19. package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
  20. package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
  21. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
  22. package/dist/persona/attribute/put/1.0/payload.js +487 -0
  23. package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
  24. package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
  25. package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
  26. package/dist/persona/binding/get/1.0/payload.js +206 -0
  27. package/dist/persona/binding/get/1.0/payload.js.map +1 -0
  28. package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
  29. package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
  30. package/dist/persona/binding/list/1.0/payload.js +210 -0
  31. package/dist/persona/binding/list/1.0/payload.js.map +1 -0
  32. package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
  33. package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
  34. package/dist/persona/binding/set/1.0/payload.js +302 -0
  35. package/dist/persona/binding/set/1.0/payload.js.map +1 -0
  36. package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
  37. package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
  38. package/dist/persona/contact/delete/1.0/payload.js +174 -0
  39. package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
  40. package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
  41. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
  42. package/dist/persona/contact/get/1.0/payload.js +606 -0
  43. package/dist/persona/contact/get/1.0/payload.js.map +1 -0
  44. package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
  45. package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
  46. package/dist/persona/contact/list/1.0/payload.js +262 -0
  47. package/dist/persona/contact/list/1.0/payload.js.map +1 -0
  48. package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
  49. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
  50. package/dist/persona/contact/put/1.0/payload.js +518 -0
  51. package/dist/persona/contact/put/1.0/payload.js.map +1 -0
  52. package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
  53. package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
  54. package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
  55. package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
  56. package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
  57. package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
  58. package/dist/persona/disclosure/history/1.0/payload.js +339 -0
  59. package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
  60. package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
  61. package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
  62. package/dist/persona/disclosure/present/1.0/payload.js +211 -0
  63. package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
  64. package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
  65. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
  66. package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
  67. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
  68. package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
  69. package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
  70. package/dist/persona/local/binding/set/1.0/payload.js +226 -0
  71. package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
  72. package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
  73. package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
  74. package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
  75. package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
  76. package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
  77. package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
  78. package/dist/persona/local/profile/get/1.0/payload.js +210 -0
  79. package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
  80. package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
  81. package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
  82. package/dist/persona/local/profile/list/1.0/payload.js +214 -0
  83. package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
  84. package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
  85. package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
  86. package/dist/persona/local/profile/put/1.0/payload.js +315 -0
  87. package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
  88. package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
  89. package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
  90. package/dist/persona/profile/delete/1.0/payload.js +189 -0
  91. package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
  92. package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
  93. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
  94. package/dist/persona/profile/get/1.0/payload.js +804 -0
  95. package/dist/persona/profile/get/1.0/payload.js.map +1 -0
  96. package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
  97. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
  98. package/dist/persona/profile/list/1.0/payload.js +680 -0
  99. package/dist/persona/profile/list/1.0/payload.js.map +1 -0
  100. package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
  101. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
  102. package/dist/persona/profile/put/1.0/payload.js +675 -0
  103. package/dist/persona/profile/put/1.0/payload.js.map +1 -0
  104. package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
  105. package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
  106. package/dist/persona/renderers/list/1.0/payload.js +197 -0
  107. package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
  108. package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
  109. package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
  110. package/dist/rooms/owner/claim/0.1/payload.js +214 -0
  111. package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
  112. package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
  113. package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
  114. package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
  115. package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
  116. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  117. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  118. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  119. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  120. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  121. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  122. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  123. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  124. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  125. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  126. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  127. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  128. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  129. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  130. package/package.json +1 -1
  131. package/src/_shared/components.ts +211 -5
  132. package/src/index.ts +27 -0
  133. package/src/persona/_shared/0.1/persona-record.ts +23 -0
  134. package/src/persona/attribute/delete/1.0/payload.ts +238 -0
  135. package/src/persona/attribute/list/1.0/payload.ts +590 -0
  136. package/src/persona/attribute/put/1.0/payload.ts +559 -0
  137. package/src/persona/binding/get/1.0/payload.ts +257 -0
  138. package/src/persona/binding/list/1.0/payload.ts +260 -0
  139. package/src/persona/binding/set/1.0/payload.ts +370 -0
  140. package/src/persona/contact/delete/1.0/payload.ts +216 -0
  141. package/src/persona/contact/get/1.0/payload.ts +662 -0
  142. package/src/persona/contact/list/1.0/payload.ts +323 -0
  143. package/src/persona/contact/put/1.0/payload.ts +580 -0
  144. package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
  145. package/src/persona/disclosure/history/1.0/payload.ts +415 -0
  146. package/src/persona/disclosure/present/1.0/payload.ts +274 -0
  147. package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
  148. package/src/persona/local/binding/set/1.0/payload.ts +267 -0
  149. package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
  150. package/src/persona/local/profile/get/1.0/payload.ts +251 -0
  151. package/src/persona/local/profile/list/1.0/payload.ts +260 -0
  152. package/src/persona/local/profile/put/1.0/payload.ts +373 -0
  153. package/src/persona/profile/delete/1.0/payload.ts +236 -0
  154. package/src/persona/profile/get/1.0/payload.ts +846 -0
  155. package/src/persona/profile/list/1.0/payload.ts +723 -0
  156. package/src/persona/profile/put/1.0/payload.ts +741 -0
  157. package/src/persona/renderers/list/1.0/payload.ts +248 -0
  158. package/src/rooms/owner/claim/0.1/payload.ts +268 -0
  159. package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
  160. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  161. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  162. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  163. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  164. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  165. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  166. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
@@ -0,0 +1,415 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/disclosure/history/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { ClaimType, Ext, ProofRung, Ulid } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * What the holder has shared, with whom, when, and — because the pool sits above the context boundary — which contexts a given attribute has reached.
11
+ */
12
+ export interface PersonaDisclosureHistoryPayload {
13
+ /**
14
+ * Narrow to one context. Omit to query across all of them, which only the holder can do and which is the whole reason this task is holder-authorized.
15
+ */
16
+ contextId?: string;
17
+ /**
18
+ * Narrow to one verifier — 'what does this site have of mine'.
19
+ */
20
+ verifierDid?: string;
21
+ /**
22
+ * Narrow to one claim type — 'where has my home address gone'. Answering this is the obligation the agent-scoped pool takes on: having put the holder's facts above the context boundary, it owes them an account of which contexts each fact has reached.
23
+ */
24
+ attributeType?: ClaimType;
25
+ since?: string;
26
+ cursor?: string;
27
+ limit?: number;
28
+ ext?: Ext;
29
+ }
30
+ /**
31
+ * Success response to persona/disclosure/history. Type https://trusttasks.org/spec/persona/disclosure/history/1.0#response. Records name claim TYPES and never values: the history says what kind of thing went where, and re-storing the values would double the exposure it exists to describe.
32
+ */
33
+ export interface PersonaDisclosureHistoryResponsePayload {
34
+ /**
35
+ * @maxItems 500
36
+ */
37
+ disclosures: {
38
+ disclosureId: Ulid;
39
+ contextId: string;
40
+ verifierDid: string;
41
+ personaDid: string;
42
+ /**
43
+ * The pairwise identifier the disclosure was made under, so a holder can tell two disclosures to the same verifier apart.
44
+ */
45
+ subject?: string;
46
+ /**
47
+ * @maxItems 128
48
+ */
49
+ claimTypes: ClaimType[];
50
+ /**
51
+ * Positionally aligned with claimTypes. A holder reviewing history needs to know not only what went but how strongly it was hidden — the same claim type at two rungs is two very different disclosures.
52
+ *
53
+ * @maxItems 128
54
+ */
55
+ rungs?: ProofRung[];
56
+ purpose?: string;
57
+ renderer?: string;
58
+ /**
59
+ * Present when the disclosure minted a durable credential — the one kind of disclosure that is still live and still revocable, which is why the history names it.
60
+ */
61
+ durableCredentialId?: string;
62
+ disclosedAt: string;
63
+ }[];
64
+ nextCursor?: string;
65
+ ext?: Ext;
66
+ }
67
+
68
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
69
+ export type { ClaimType, Ext, ProofRung, Ulid };
70
+
71
+ /** Trust Task type URI. */
72
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/disclosure/history/1.0" as const;
73
+
74
+ /** Stable alias for this specification's request payload shape. */
75
+ export type Payload = PersonaDisclosureHistoryPayload;
76
+
77
+ /** Trust Task response type URI (request type URI + "#response"). */
78
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/disclosure/history/1.0#response" as const;
79
+
80
+ /** Stable alias for this specification's success-response payload shape. */
81
+ export type Response = PersonaDisclosureHistoryResponsePayload;
82
+
83
+ /**
84
+ * This specification's payload schema, as a value.
85
+ *
86
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
87
+ * rather than only as a `.json` file because TypeScript types are erased
88
+ * at runtime: without a schema a consumer has nothing to validate, and
89
+ * every REQUIRED payload member is optional in practice. Cross-file
90
+ * `$ref`s are already inlined, so it needs no resolver.
91
+ */
92
+ export const PAYLOAD_SCHEMA = {
93
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
94
+ "$id": "https://trusttasks.org/spec/persona/disclosure/history/1.0",
95
+ "title": "Persona Disclosure History — payload",
96
+ "description": "What the holder has shared, with whom, when, and — because the pool sits above the context boundary — which contexts a given attribute has reached.",
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "properties": {
100
+ "contextId": {
101
+ "type": "string",
102
+ "minLength": 1,
103
+ "description": "Narrow to one context. Omit to query across all of them, which only the holder can do and which is the whole reason this task is holder-authorized."
104
+ },
105
+ "verifierDid": {
106
+ "type": "string",
107
+ "maxLength": 2048,
108
+ "description": "Narrow to one verifier — 'what does this site have of mine'."
109
+ },
110
+ "attributeType": {
111
+ "$ref": "#/$defs/ClaimType",
112
+ "description": "Narrow to one claim type — 'where has my home address gone'. Answering this is the obligation the agent-scoped pool takes on: having put the holder's facts above the context boundary, it owes them an account of which contexts each fact has reached."
113
+ },
114
+ "since": {
115
+ "type": "string",
116
+ "format": "date-time"
117
+ },
118
+ "cursor": {
119
+ "type": "string",
120
+ "maxLength": 4096
121
+ },
122
+ "limit": {
123
+ "type": "integer",
124
+ "minimum": 1,
125
+ "maximum": 500,
126
+ "default": 100
127
+ },
128
+ "ext": {
129
+ "$ref": "#/$defs/Ext"
130
+ }
131
+ },
132
+ "$defs": {
133
+ "Response": {
134
+ "$anchor": "response",
135
+ "title": "Persona Disclosure History — response payload",
136
+ "description": "Success response to persona/disclosure/history. Type https://trusttasks.org/spec/persona/disclosure/history/1.0#response. Records name claim TYPES and never values: the history says what kind of thing went where, and re-storing the values would double the exposure it exists to describe.",
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": [
140
+ "disclosures"
141
+ ],
142
+ "properties": {
143
+ "disclosures": {
144
+ "type": "array",
145
+ "maxItems": 500,
146
+ "items": {
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "required": [
150
+ "disclosureId",
151
+ "contextId",
152
+ "verifierDid",
153
+ "personaDid",
154
+ "claimTypes",
155
+ "disclosedAt"
156
+ ],
157
+ "properties": {
158
+ "disclosureId": {
159
+ "$ref": "#/$defs/Ulid"
160
+ },
161
+ "contextId": {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ "verifierDid": {
166
+ "type": "string",
167
+ "minLength": 1
168
+ },
169
+ "personaDid": {
170
+ "type": "string",
171
+ "minLength": 1
172
+ },
173
+ "subject": {
174
+ "type": "string",
175
+ "description": "The pairwise identifier the disclosure was made under, so a holder can tell two disclosures to the same verifier apart."
176
+ },
177
+ "claimTypes": {
178
+ "type": "array",
179
+ "maxItems": 128,
180
+ "items": {
181
+ "$ref": "#/$defs/ClaimType"
182
+ }
183
+ },
184
+ "rungs": {
185
+ "type": "array",
186
+ "maxItems": 128,
187
+ "items": {
188
+ "$ref": "#/$defs/ProofRung"
189
+ },
190
+ "description": "Positionally aligned with claimTypes. A holder reviewing history needs to know not only what went but how strongly it was hidden — the same claim type at two rungs is two very different disclosures."
191
+ },
192
+ "purpose": {
193
+ "type": "string",
194
+ "maxLength": 512
195
+ },
196
+ "renderer": {
197
+ "type": "string",
198
+ "maxLength": 64
199
+ },
200
+ "durableCredentialId": {
201
+ "type": "string",
202
+ "description": "Present when the disclosure minted a durable credential — the one kind of disclosure that is still live and still revocable, which is why the history names it."
203
+ },
204
+ "disclosedAt": {
205
+ "type": "string",
206
+ "format": "date-time"
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "nextCursor": {
212
+ "type": "string",
213
+ "maxLength": 4096
214
+ },
215
+ "ext": {
216
+ "$ref": "#/$defs/Ext"
217
+ }
218
+ }
219
+ },
220
+ "Ext": {
221
+ "title": "Ext",
222
+ "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.",
223
+ "type": "object",
224
+ "minProperties": 1,
225
+ "additionalProperties": true,
226
+ "propertyNames": {
227
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
228
+ }
229
+ },
230
+ "ProofRung": {
231
+ "title": "ProofRung",
232
+ "description": "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.",
233
+ "type": "string",
234
+ "enum": [
235
+ "predicate",
236
+ "derived",
237
+ "selectiveDisclosure",
238
+ "whole"
239
+ ]
240
+ },
241
+ "ClaimType": {
242
+ "title": "ClaimType",
243
+ "description": "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.",
244
+ "type": "string",
245
+ "minLength": 1,
246
+ "maxLength": 128,
247
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
248
+ },
249
+ "Ulid": {
250
+ "title": "Ulid",
251
+ "description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
252
+ "type": "string",
253
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
254
+ }
255
+ }
256
+ } as const;
257
+
258
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
259
+ export const RESPONSE_PAYLOAD_SCHEMA = {
260
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
261
+ "$ref": "#/$defs/Response",
262
+ "$defs": {
263
+ "Response": {
264
+ "$anchor": "response",
265
+ "title": "Persona Disclosure History — response payload",
266
+ "description": "Success response to persona/disclosure/history. Type https://trusttasks.org/spec/persona/disclosure/history/1.0#response. Records name claim TYPES and never values: the history says what kind of thing went where, and re-storing the values would double the exposure it exists to describe.",
267
+ "type": "object",
268
+ "additionalProperties": false,
269
+ "required": [
270
+ "disclosures"
271
+ ],
272
+ "properties": {
273
+ "disclosures": {
274
+ "type": "array",
275
+ "maxItems": 500,
276
+ "items": {
277
+ "type": "object",
278
+ "additionalProperties": false,
279
+ "required": [
280
+ "disclosureId",
281
+ "contextId",
282
+ "verifierDid",
283
+ "personaDid",
284
+ "claimTypes",
285
+ "disclosedAt"
286
+ ],
287
+ "properties": {
288
+ "disclosureId": {
289
+ "$ref": "#/$defs/Ulid"
290
+ },
291
+ "contextId": {
292
+ "type": "string",
293
+ "minLength": 1
294
+ },
295
+ "verifierDid": {
296
+ "type": "string",
297
+ "minLength": 1
298
+ },
299
+ "personaDid": {
300
+ "type": "string",
301
+ "minLength": 1
302
+ },
303
+ "subject": {
304
+ "type": "string",
305
+ "description": "The pairwise identifier the disclosure was made under, so a holder can tell two disclosures to the same verifier apart."
306
+ },
307
+ "claimTypes": {
308
+ "type": "array",
309
+ "maxItems": 128,
310
+ "items": {
311
+ "$ref": "#/$defs/ClaimType"
312
+ }
313
+ },
314
+ "rungs": {
315
+ "type": "array",
316
+ "maxItems": 128,
317
+ "items": {
318
+ "$ref": "#/$defs/ProofRung"
319
+ },
320
+ "description": "Positionally aligned with claimTypes. A holder reviewing history needs to know not only what went but how strongly it was hidden — the same claim type at two rungs is two very different disclosures."
321
+ },
322
+ "purpose": {
323
+ "type": "string",
324
+ "maxLength": 512
325
+ },
326
+ "renderer": {
327
+ "type": "string",
328
+ "maxLength": 64
329
+ },
330
+ "durableCredentialId": {
331
+ "type": "string",
332
+ "description": "Present when the disclosure minted a durable credential — the one kind of disclosure that is still live and still revocable, which is why the history names it."
333
+ },
334
+ "disclosedAt": {
335
+ "type": "string",
336
+ "format": "date-time"
337
+ }
338
+ }
339
+ }
340
+ },
341
+ "nextCursor": {
342
+ "type": "string",
343
+ "maxLength": 4096
344
+ },
345
+ "ext": {
346
+ "$ref": "#/$defs/Ext"
347
+ }
348
+ }
349
+ },
350
+ "Ext": {
351
+ "title": "Ext",
352
+ "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.",
353
+ "type": "object",
354
+ "minProperties": 1,
355
+ "additionalProperties": true,
356
+ "propertyNames": {
357
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
358
+ }
359
+ },
360
+ "ProofRung": {
361
+ "title": "ProofRung",
362
+ "description": "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.",
363
+ "type": "string",
364
+ "enum": [
365
+ "predicate",
366
+ "derived",
367
+ "selectiveDisclosure",
368
+ "whole"
369
+ ]
370
+ },
371
+ "ClaimType": {
372
+ "title": "ClaimType",
373
+ "description": "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.",
374
+ "type": "string",
375
+ "minLength": 1,
376
+ "maxLength": 128,
377
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
378
+ },
379
+ "Ulid": {
380
+ "title": "Ulid",
381
+ "description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
382
+ "type": "string",
383
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
384
+ }
385
+ }
386
+ } as const;
387
+
388
+ /**
389
+ * SPEC.md §7.2 policy for the request variant, from this specification's
390
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
391
+ * per-specification and cannot be derived from the document alone, and
392
+ * item 2 needs the schema this carries.
393
+ */
394
+ export const SPEC = {
395
+ typeUri: TYPE_URI,
396
+ isBearer: false,
397
+ isProofRequired: true,
398
+ isRecipientRequired: true,
399
+ isIssuedAtRequired: false,
400
+ payloadSchema: PAYLOAD_SCHEMA,
401
+ } as const;
402
+
403
+ /**
404
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
405
+ * tracks the *issuer* party's requirement because a response swaps the
406
+ * parties (§7.3 item 5).
407
+ */
408
+ export const RESPONSE_SPEC = {
409
+ typeUri: RESPONSE_TYPE_URI,
410
+ isBearer: false,
411
+ isProofRequired: true,
412
+ isRecipientRequired: true,
413
+ isIssuedAtRequired: false,
414
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
415
+ } as const;