@openvtc/trust-tasks 0.16.8 → 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 (206) hide show
  1. package/CHANGELOG.md +285 -0
  2. package/dist/_shared/components.d.ts +206 -7
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +31 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +31 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
  25. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
  26. package/dist/persona/_shared/0.1/persona-record.js +6 -0
  27. package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
  28. package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
  29. package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
  30. package/dist/persona/attribute/delete/1.0/payload.js +188 -0
  31. package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
  32. package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
  33. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
  34. package/dist/persona/attribute/list/1.0/payload.js +532 -0
  35. package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
  36. package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
  37. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
  38. package/dist/persona/attribute/put/1.0/payload.js +487 -0
  39. package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
  40. package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
  41. package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
  42. package/dist/persona/binding/get/1.0/payload.js +206 -0
  43. package/dist/persona/binding/get/1.0/payload.js.map +1 -0
  44. package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
  45. package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
  46. package/dist/persona/binding/list/1.0/payload.js +210 -0
  47. package/dist/persona/binding/list/1.0/payload.js.map +1 -0
  48. package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
  49. package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
  50. package/dist/persona/binding/set/1.0/payload.js +302 -0
  51. package/dist/persona/binding/set/1.0/payload.js.map +1 -0
  52. package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
  53. package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
  54. package/dist/persona/contact/delete/1.0/payload.js +174 -0
  55. package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
  56. package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
  57. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
  58. package/dist/persona/contact/get/1.0/payload.js +606 -0
  59. package/dist/persona/contact/get/1.0/payload.js.map +1 -0
  60. package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
  61. package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
  62. package/dist/persona/contact/list/1.0/payload.js +262 -0
  63. package/dist/persona/contact/list/1.0/payload.js.map +1 -0
  64. package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
  65. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
  66. package/dist/persona/contact/put/1.0/payload.js +518 -0
  67. package/dist/persona/contact/put/1.0/payload.js.map +1 -0
  68. package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
  69. package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
  70. package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
  71. package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
  72. package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
  73. package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
  74. package/dist/persona/disclosure/history/1.0/payload.js +339 -0
  75. package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
  76. package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
  77. package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
  78. package/dist/persona/disclosure/present/1.0/payload.js +211 -0
  79. package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
  80. package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
  81. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
  82. package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
  83. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
  84. package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
  85. package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
  86. package/dist/persona/local/binding/set/1.0/payload.js +226 -0
  87. package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
  88. package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
  89. package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
  90. package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
  91. package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
  92. package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
  93. package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
  94. package/dist/persona/local/profile/get/1.0/payload.js +210 -0
  95. package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
  96. package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
  97. package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
  98. package/dist/persona/local/profile/list/1.0/payload.js +214 -0
  99. package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
  100. package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
  101. package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
  102. package/dist/persona/local/profile/put/1.0/payload.js +315 -0
  103. package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
  104. package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
  105. package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
  106. package/dist/persona/profile/delete/1.0/payload.js +189 -0
  107. package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
  108. package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
  109. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
  110. package/dist/persona/profile/get/1.0/payload.js +804 -0
  111. package/dist/persona/profile/get/1.0/payload.js.map +1 -0
  112. package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
  113. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
  114. package/dist/persona/profile/list/1.0/payload.js +680 -0
  115. package/dist/persona/profile/list/1.0/payload.js.map +1 -0
  116. package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
  117. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
  118. package/dist/persona/profile/put/1.0/payload.js +675 -0
  119. package/dist/persona/profile/put/1.0/payload.js.map +1 -0
  120. package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
  121. package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
  122. package/dist/persona/renderers/list/1.0/payload.js +197 -0
  123. package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
  124. package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
  125. package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
  126. package/dist/rooms/keys/commit/0.1/payload.js +146 -0
  127. package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
  128. package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
  129. package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
  130. package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
  131. package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
  132. package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
  133. package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
  134. package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
  135. package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
  136. package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
  137. package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
  138. package/dist/rooms/owner/claim/0.1/payload.js +214 -0
  139. package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
  140. package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
  141. package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
  142. package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
  143. package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
  144. package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
  145. package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
  146. package/dist/rooms/records/curate/0.1/payload.js +277 -0
  147. package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
  148. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  149. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  150. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  151. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  152. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  153. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  154. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  155. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  156. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  157. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  158. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  159. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  160. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  161. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  162. package/package.json +1 -1
  163. package/src/_shared/components.ts +217 -7
  164. package/src/device/list/0.1/payload.ts +6 -2
  165. package/src/device/list/0.2/payload.ts +6 -2
  166. package/src/device/register/0.1/payload.ts +6 -2
  167. package/src/device/register/0.2/payload.ts +6 -2
  168. package/src/index.ts +31 -0
  169. package/src/persona/_shared/0.1/persona-record.ts +23 -0
  170. package/src/persona/attribute/delete/1.0/payload.ts +238 -0
  171. package/src/persona/attribute/list/1.0/payload.ts +590 -0
  172. package/src/persona/attribute/put/1.0/payload.ts +559 -0
  173. package/src/persona/binding/get/1.0/payload.ts +257 -0
  174. package/src/persona/binding/list/1.0/payload.ts +260 -0
  175. package/src/persona/binding/set/1.0/payload.ts +370 -0
  176. package/src/persona/contact/delete/1.0/payload.ts +216 -0
  177. package/src/persona/contact/get/1.0/payload.ts +662 -0
  178. package/src/persona/contact/list/1.0/payload.ts +323 -0
  179. package/src/persona/contact/put/1.0/payload.ts +580 -0
  180. package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
  181. package/src/persona/disclosure/history/1.0/payload.ts +415 -0
  182. package/src/persona/disclosure/present/1.0/payload.ts +274 -0
  183. package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
  184. package/src/persona/local/binding/set/1.0/payload.ts +267 -0
  185. package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
  186. package/src/persona/local/profile/get/1.0/payload.ts +251 -0
  187. package/src/persona/local/profile/list/1.0/payload.ts +260 -0
  188. package/src/persona/local/profile/put/1.0/payload.ts +373 -0
  189. package/src/persona/profile/delete/1.0/payload.ts +236 -0
  190. package/src/persona/profile/get/1.0/payload.ts +846 -0
  191. package/src/persona/profile/list/1.0/payload.ts +723 -0
  192. package/src/persona/profile/put/1.0/payload.ts +741 -0
  193. package/src/persona/renderers/list/1.0/payload.ts +248 -0
  194. package/src/rooms/keys/commit/0.1/payload.ts +195 -0
  195. package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
  196. package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
  197. package/src/rooms/owner/claim/0.1/payload.ts +268 -0
  198. package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
  199. package/src/rooms/records/curate/0.1/payload.ts +357 -0
  200. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  201. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  202. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  203. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  204. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  205. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  206. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
@@ -0,0 +1,590 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/attribute/list/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { Attribute, ClaimType, Ext, ProofRung, Provenance, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Enumerate the holder's attribute pool, optionally narrowed to a vocabulary prefix. Cursor-paginated. Values are omitted unless asked for, so a picker can render the pool without decrypting every fact in it.
11
+ */
12
+ export interface PersonaAttributeListPayload {
13
+ /**
14
+ * Narrows the result to attributes whose `type` begins with this string, compared over the UTF-8 encoding. Because the vocabulary is dotted most-general-segment-first, `phone` selects every phone number and `name` every name — which is the access pattern a builder actually has. The maintainer MUST NOT interpret the value further; a prefix that ends mid-segment is a byte comparison like any other.
15
+ */
16
+ typePrefix?: string;
17
+ /**
18
+ * When false (the default), each returned attribute carries its metadata and no `value`. A pool listing is the common case and it does not need plaintext: a picker renders `type` and `label`. Defaulting to false means the expensive, sensitive path is the one a producer has to ask for.
19
+ */
20
+ includeValues?: boolean;
21
+ /**
22
+ * When true (the default), credential-backed attributes whose backing could not be re-derived are returned carrying `stale` and `staleReason`. Set false to omit them. The default is true because a holder needs to SEE that a credential-backed fact has gone stale — silently dropping it would present a pool that looks smaller than it is, and the holder would not know a claim had stopped being presentable.
23
+ */
24
+ includeStale?: boolean;
25
+ /**
26
+ * Opaque continuation token from a prior response's `nextCursor`. A producer MUST NOT construct or parse one.
27
+ */
28
+ cursor?: string;
29
+ /**
30
+ * Maximum attributes to return. The maintainer MAY return fewer for reasons of its own and a producer MUST NOT infer exhaustion from a short page — only an absent `nextCursor` means the end.
31
+ */
32
+ limit?: number;
33
+ ext?: Ext;
34
+ }
35
+ /**
36
+ * Success response to persona/attribute/list. Type https://trusttasks.org/spec/persona/attribute/list/1.0#response.
37
+ */
38
+ export interface PersonaAttributeListResponsePayload {
39
+ /**
40
+ * @maxItems 500
41
+ */
42
+ attributes: Attribute[];
43
+ /**
44
+ * Present when more attributes remain. Absent means the enumeration is complete — that absence is the only exhaustion signal.
45
+ */
46
+ nextCursor?: string;
47
+ ext?: Ext;
48
+ }
49
+
50
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
51
+ export type { Attribute, ClaimType, Ext, ProofRung, Provenance, Ulid, ValueType, Version };
52
+
53
+ /** Trust Task type URI. */
54
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/attribute/list/1.0" as const;
55
+
56
+ /** Stable alias for this specification's request payload shape. */
57
+ export type Payload = PersonaAttributeListPayload;
58
+
59
+ /** Trust Task response type URI (request type URI + "#response"). */
60
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/attribute/list/1.0#response" as const;
61
+
62
+ /** Stable alias for this specification's success-response payload shape. */
63
+ export type Response = PersonaAttributeListResponsePayload;
64
+
65
+ /**
66
+ * This specification's payload schema, as a value.
67
+ *
68
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
69
+ * rather than only as a `.json` file because TypeScript types are erased
70
+ * at runtime: without a schema a consumer has nothing to validate, and
71
+ * every REQUIRED payload member is optional in practice. Cross-file
72
+ * `$ref`s are already inlined, so it needs no resolver.
73
+ */
74
+ export const PAYLOAD_SCHEMA = {
75
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
76
+ "$id": "https://trusttasks.org/spec/persona/attribute/list/1.0",
77
+ "title": "Persona Attribute List — payload",
78
+ "description": "Enumerate the holder's attribute pool, optionally narrowed to a vocabulary prefix. Cursor-paginated. Values are omitted unless asked for, so a picker can render the pool without decrypting every fact in it.",
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "properties": {
82
+ "typePrefix": {
83
+ "type": "string",
84
+ "maxLength": 128,
85
+ "description": "Narrows the result to attributes whose `type` begins with this string, compared over the UTF-8 encoding. Because the vocabulary is dotted most-general-segment-first, `phone` selects every phone number and `name` every name — which is the access pattern a builder actually has. The maintainer MUST NOT interpret the value further; a prefix that ends mid-segment is a byte comparison like any other."
86
+ },
87
+ "includeValues": {
88
+ "type": "boolean",
89
+ "default": false,
90
+ "description": "When false (the default), each returned attribute carries its metadata and no `value`. A pool listing is the common case and it does not need plaintext: a picker renders `type` and `label`. Defaulting to false means the expensive, sensitive path is the one a producer has to ask for."
91
+ },
92
+ "includeStale": {
93
+ "type": "boolean",
94
+ "default": true,
95
+ "description": "When true (the default), credential-backed attributes whose backing could not be re-derived are returned carrying `stale` and `staleReason`. Set false to omit them. The default is true because a holder needs to SEE that a credential-backed fact has gone stale — silently dropping it would present a pool that looks smaller than it is, and the holder would not know a claim had stopped being presentable."
96
+ },
97
+ "cursor": {
98
+ "type": "string",
99
+ "maxLength": 4096,
100
+ "description": "Opaque continuation token from a prior response's `nextCursor`. A producer MUST NOT construct or parse one."
101
+ },
102
+ "limit": {
103
+ "type": "integer",
104
+ "minimum": 1,
105
+ "maximum": 500,
106
+ "default": 100,
107
+ "description": "Maximum attributes to return. The maintainer MAY return fewer for reasons of its own and a producer MUST NOT infer exhaustion from a short page — only an absent `nextCursor` means the end."
108
+ },
109
+ "ext": {
110
+ "$ref": "#/$defs/Ext"
111
+ }
112
+ },
113
+ "$defs": {
114
+ "Response": {
115
+ "$anchor": "response",
116
+ "title": "Persona Attribute List — response payload",
117
+ "description": "Success response to persona/attribute/list. Type https://trusttasks.org/spec/persona/attribute/list/1.0#response.",
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": [
121
+ "attributes"
122
+ ],
123
+ "properties": {
124
+ "attributes": {
125
+ "type": "array",
126
+ "maxItems": 500,
127
+ "items": {
128
+ "$ref": "#/$defs/Attribute"
129
+ }
130
+ },
131
+ "nextCursor": {
132
+ "type": "string",
133
+ "maxLength": 4096,
134
+ "description": "Present when more attributes remain. Absent means the enumeration is complete — that absence is the only exhaustion signal."
135
+ },
136
+ "ext": {
137
+ "$ref": "#/$defs/Ext"
138
+ }
139
+ }
140
+ },
141
+ "Ext": {
142
+ "title": "Ext",
143
+ "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.",
144
+ "type": "object",
145
+ "minProperties": 1,
146
+ "additionalProperties": true,
147
+ "propertyNames": {
148
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
149
+ }
150
+ },
151
+ "Attribute": {
152
+ "title": "Attribute",
153
+ "description": "One atomic fact a holder keeps about themselves. Several attributes MAY share a `type` — three phone numbers, a legal name and a preferred name — which is why `attributeId` is the identity of a fact and `type` is not. The pool is flat and unordered; ordering is a profile's concern.",
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": [
157
+ "attributeId",
158
+ "type",
159
+ "valueType",
160
+ "value",
161
+ "provenance",
162
+ "version",
163
+ "updatedAt"
164
+ ],
165
+ "properties": {
166
+ "attributeId": {
167
+ "$ref": "#/$defs/Ulid"
168
+ },
169
+ "type": {
170
+ "$ref": "#/$defs/ClaimType"
171
+ },
172
+ "valueType": {
173
+ "$ref": "#/$defs/ValueType"
174
+ },
175
+ "value": {
176
+ "description": "The fact itself, agreeing with `valueType`. Encrypted at rest by the maintainer. Absent when the caller asked for a metadata-only view, and absent when a credential-backed value could not be re-derived — a consumer MUST NOT conflate the two and MUST read `stale` to tell them apart."
177
+ },
178
+ "label": {
179
+ "type": "string",
180
+ "maxLength": 128,
181
+ "description": "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self."
182
+ },
183
+ "provenance": {
184
+ "$ref": "#/$defs/Provenance"
185
+ },
186
+ "stale": {
187
+ "type": "boolean",
188
+ "description": "Present and true when a `credentialBacked` value could not be re-derived. `staleReason` says why. A maintainer MUST refuse to disclose a stale attribute."
189
+ },
190
+ "staleReason": {
191
+ "type": "string",
192
+ "enum": [
193
+ "revoked",
194
+ "expired",
195
+ "archived",
196
+ "deleted",
197
+ "notFound"
198
+ ],
199
+ "description": "Why re-derivation failed. Present only alongside `stale`."
200
+ },
201
+ "version": {
202
+ "$ref": "#/$defs/Version"
203
+ },
204
+ "createdAt": {
205
+ "type": "string",
206
+ "format": "date-time"
207
+ },
208
+ "updatedAt": {
209
+ "type": "string",
210
+ "format": "date-time"
211
+ }
212
+ }
213
+ },
214
+ "Version": {
215
+ "title": "Version",
216
+ "description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
217
+ "type": "integer",
218
+ "minimum": 1
219
+ },
220
+ "Provenance": {
221
+ "title": "Provenance",
222
+ "description": "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.",
223
+ "type": "object",
224
+ "required": [
225
+ "kind"
226
+ ],
227
+ "oneOf": [
228
+ {
229
+ "additionalProperties": false,
230
+ "required": [
231
+ "kind"
232
+ ],
233
+ "properties": {
234
+ "kind": {
235
+ "const": "selfAsserted"
236
+ }
237
+ }
238
+ },
239
+ {
240
+ "additionalProperties": false,
241
+ "required": [
242
+ "kind",
243
+ "credentialId",
244
+ "claimPath"
245
+ ],
246
+ "properties": {
247
+ "kind": {
248
+ "const": "credentialBacked"
249
+ },
250
+ "credentialId": {
251
+ "type": "string",
252
+ "minLength": 1,
253
+ "description": "Vault identifier of the backing credential."
254
+ },
255
+ "claimPath": {
256
+ "type": "string",
257
+ "pattern": "^(/[^/~]*(~[01][^/~]*)*)*$",
258
+ "description": "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`."
259
+ },
260
+ "issuerDid": {
261
+ "type": "string",
262
+ "minLength": 1,
263
+ "description": "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member."
264
+ },
265
+ "proof": {
266
+ "$ref": "#/$defs/ProofRung",
267
+ "description": "The disclosure rung this claim was, or will be, presented at."
268
+ }
269
+ }
270
+ },
271
+ {
272
+ "additionalProperties": false,
273
+ "required": [
274
+ "kind",
275
+ "generator"
276
+ ],
277
+ "properties": {
278
+ "kind": {
279
+ "const": "generated"
280
+ },
281
+ "generator": {
282
+ "type": "string",
283
+ "minLength": 1,
284
+ "maxLength": 64,
285
+ "description": "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined."
286
+ },
287
+ "perVerifier": {
288
+ "type": "boolean",
289
+ "default": true,
290
+ "description": "When true (the default and the only useful setting), a distinct value is minted for each verifier."
291
+ }
292
+ }
293
+ }
294
+ ]
295
+ },
296
+ "ProofRung": {
297
+ "title": "ProofRung",
298
+ "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.",
299
+ "type": "string",
300
+ "enum": [
301
+ "predicate",
302
+ "derived",
303
+ "selectiveDisclosure",
304
+ "whole"
305
+ ]
306
+ },
307
+ "ValueType": {
308
+ "title": "ValueType",
309
+ "description": "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.",
310
+ "type": "string",
311
+ "enum": [
312
+ "string",
313
+ "number",
314
+ "boolean",
315
+ "date",
316
+ "object"
317
+ ]
318
+ },
319
+ "ClaimType": {
320
+ "title": "ClaimType",
321
+ "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.",
322
+ "type": "string",
323
+ "minLength": 1,
324
+ "maxLength": 128,
325
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
326
+ },
327
+ "Ulid": {
328
+ "title": "Ulid",
329
+ "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.",
330
+ "type": "string",
331
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
332
+ }
333
+ }
334
+ } as const;
335
+
336
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
337
+ export const RESPONSE_PAYLOAD_SCHEMA = {
338
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
339
+ "$ref": "#/$defs/Response",
340
+ "$defs": {
341
+ "Response": {
342
+ "$anchor": "response",
343
+ "title": "Persona Attribute List — response payload",
344
+ "description": "Success response to persona/attribute/list. Type https://trusttasks.org/spec/persona/attribute/list/1.0#response.",
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "required": [
348
+ "attributes"
349
+ ],
350
+ "properties": {
351
+ "attributes": {
352
+ "type": "array",
353
+ "maxItems": 500,
354
+ "items": {
355
+ "$ref": "#/$defs/Attribute"
356
+ }
357
+ },
358
+ "nextCursor": {
359
+ "type": "string",
360
+ "maxLength": 4096,
361
+ "description": "Present when more attributes remain. Absent means the enumeration is complete — that absence is the only exhaustion signal."
362
+ },
363
+ "ext": {
364
+ "$ref": "#/$defs/Ext"
365
+ }
366
+ }
367
+ },
368
+ "Ext": {
369
+ "title": "Ext",
370
+ "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.",
371
+ "type": "object",
372
+ "minProperties": 1,
373
+ "additionalProperties": true,
374
+ "propertyNames": {
375
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
376
+ }
377
+ },
378
+ "Attribute": {
379
+ "title": "Attribute",
380
+ "description": "One atomic fact a holder keeps about themselves. Several attributes MAY share a `type` — three phone numbers, a legal name and a preferred name — which is why `attributeId` is the identity of a fact and `type` is not. The pool is flat and unordered; ordering is a profile's concern.",
381
+ "type": "object",
382
+ "additionalProperties": false,
383
+ "required": [
384
+ "attributeId",
385
+ "type",
386
+ "valueType",
387
+ "value",
388
+ "provenance",
389
+ "version",
390
+ "updatedAt"
391
+ ],
392
+ "properties": {
393
+ "attributeId": {
394
+ "$ref": "#/$defs/Ulid"
395
+ },
396
+ "type": {
397
+ "$ref": "#/$defs/ClaimType"
398
+ },
399
+ "valueType": {
400
+ "$ref": "#/$defs/ValueType"
401
+ },
402
+ "value": {
403
+ "description": "The fact itself, agreeing with `valueType`. Encrypted at rest by the maintainer. Absent when the caller asked for a metadata-only view, and absent when a credential-backed value could not be re-derived — a consumer MUST NOT conflate the two and MUST read `stale` to tell them apart."
404
+ },
405
+ "label": {
406
+ "type": "string",
407
+ "maxLength": 128,
408
+ "description": "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self."
409
+ },
410
+ "provenance": {
411
+ "$ref": "#/$defs/Provenance"
412
+ },
413
+ "stale": {
414
+ "type": "boolean",
415
+ "description": "Present and true when a `credentialBacked` value could not be re-derived. `staleReason` says why. A maintainer MUST refuse to disclose a stale attribute."
416
+ },
417
+ "staleReason": {
418
+ "type": "string",
419
+ "enum": [
420
+ "revoked",
421
+ "expired",
422
+ "archived",
423
+ "deleted",
424
+ "notFound"
425
+ ],
426
+ "description": "Why re-derivation failed. Present only alongside `stale`."
427
+ },
428
+ "version": {
429
+ "$ref": "#/$defs/Version"
430
+ },
431
+ "createdAt": {
432
+ "type": "string",
433
+ "format": "date-time"
434
+ },
435
+ "updatedAt": {
436
+ "type": "string",
437
+ "format": "date-time"
438
+ }
439
+ }
440
+ },
441
+ "Version": {
442
+ "title": "Version",
443
+ "description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
444
+ "type": "integer",
445
+ "minimum": 1
446
+ },
447
+ "Provenance": {
448
+ "title": "Provenance",
449
+ "description": "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.",
450
+ "type": "object",
451
+ "required": [
452
+ "kind"
453
+ ],
454
+ "oneOf": [
455
+ {
456
+ "additionalProperties": false,
457
+ "required": [
458
+ "kind"
459
+ ],
460
+ "properties": {
461
+ "kind": {
462
+ "const": "selfAsserted"
463
+ }
464
+ }
465
+ },
466
+ {
467
+ "additionalProperties": false,
468
+ "required": [
469
+ "kind",
470
+ "credentialId",
471
+ "claimPath"
472
+ ],
473
+ "properties": {
474
+ "kind": {
475
+ "const": "credentialBacked"
476
+ },
477
+ "credentialId": {
478
+ "type": "string",
479
+ "minLength": 1,
480
+ "description": "Vault identifier of the backing credential."
481
+ },
482
+ "claimPath": {
483
+ "type": "string",
484
+ "pattern": "^(/[^/~]*(~[01][^/~]*)*)*$",
485
+ "description": "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`."
486
+ },
487
+ "issuerDid": {
488
+ "type": "string",
489
+ "minLength": 1,
490
+ "description": "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member."
491
+ },
492
+ "proof": {
493
+ "$ref": "#/$defs/ProofRung",
494
+ "description": "The disclosure rung this claim was, or will be, presented at."
495
+ }
496
+ }
497
+ },
498
+ {
499
+ "additionalProperties": false,
500
+ "required": [
501
+ "kind",
502
+ "generator"
503
+ ],
504
+ "properties": {
505
+ "kind": {
506
+ "const": "generated"
507
+ },
508
+ "generator": {
509
+ "type": "string",
510
+ "minLength": 1,
511
+ "maxLength": 64,
512
+ "description": "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined."
513
+ },
514
+ "perVerifier": {
515
+ "type": "boolean",
516
+ "default": true,
517
+ "description": "When true (the default and the only useful setting), a distinct value is minted for each verifier."
518
+ }
519
+ }
520
+ }
521
+ ]
522
+ },
523
+ "ProofRung": {
524
+ "title": "ProofRung",
525
+ "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.",
526
+ "type": "string",
527
+ "enum": [
528
+ "predicate",
529
+ "derived",
530
+ "selectiveDisclosure",
531
+ "whole"
532
+ ]
533
+ },
534
+ "ValueType": {
535
+ "title": "ValueType",
536
+ "description": "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.",
537
+ "type": "string",
538
+ "enum": [
539
+ "string",
540
+ "number",
541
+ "boolean",
542
+ "date",
543
+ "object"
544
+ ]
545
+ },
546
+ "ClaimType": {
547
+ "title": "ClaimType",
548
+ "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.",
549
+ "type": "string",
550
+ "minLength": 1,
551
+ "maxLength": 128,
552
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
553
+ },
554
+ "Ulid": {
555
+ "title": "Ulid",
556
+ "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.",
557
+ "type": "string",
558
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
559
+ }
560
+ }
561
+ } as const;
562
+
563
+ /**
564
+ * SPEC.md §7.2 policy for the request variant, from this specification's
565
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
566
+ * per-specification and cannot be derived from the document alone, and
567
+ * item 2 needs the schema this carries.
568
+ */
569
+ export const SPEC = {
570
+ typeUri: TYPE_URI,
571
+ isBearer: false,
572
+ isProofRequired: true,
573
+ isRecipientRequired: true,
574
+ isIssuedAtRequired: false,
575
+ payloadSchema: PAYLOAD_SCHEMA,
576
+ } as const;
577
+
578
+ /**
579
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
580
+ * tracks the *issuer* party's requirement because a response swaps the
581
+ * parties (§7.3 item 5).
582
+ */
583
+ export const RESPONSE_SPEC = {
584
+ typeUri: RESPONSE_TYPE_URI,
585
+ isBearer: false,
586
+ isProofRequired: true,
587
+ isRecipientRequired: true,
588
+ isIssuedAtRequired: false,
589
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
590
+ } as const;