@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,846 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/profile/get/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { Attribute, ClaimType, Ext, Profile, ProfileEntry, ProofRung, Provenance, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Read one profile, either as composed (the entries the holder wrote) or as resolved (the claims it would actually present).
11
+ */
12
+ export interface PersonaProfileGetPayload {
13
+ profileId: Ulid;
14
+ /**
15
+ * When false (the default) the profile is returned as composed — entries as written, references unresolved. When true the maintainer resolves every entry against the pool and returns the claims the profile would present, which is what a preview renders and what a holder is really asking when they ask what a profile says. The default is the cheap, non-disclosing one.
16
+ */
17
+ resolve?: boolean;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * Success response to persona/profile/get. Type https://trusttasks.org/spec/persona/profile/get/1.0#response.
22
+ */
23
+ export interface PersonaProfileGetResponsePayload {
24
+ profile: Profile;
25
+ /**
26
+ * Present only when `resolve` was true: the claims this profile would present, in entry order, with overrides applied and pinned versions honoured. A credential-backed claim whose backing could not be re-derived appears carrying `stale`, because a holder inspecting a profile needs to see that it has stopped being fully presentable.
27
+ *
28
+ * @maxItems 256
29
+ */
30
+ resolved?: Attribute[];
31
+ ext?: Ext;
32
+ }
33
+
34
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
35
+ export type { Attribute, ClaimType, Ext, Profile, ProfileEntry, ProofRung, Provenance, Ulid, ValueType, Version };
36
+
37
+ /** Trust Task type URI. */
38
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/get/1.0" as const;
39
+
40
+ /** Stable alias for this specification's request payload shape. */
41
+ export type Payload = PersonaProfileGetPayload;
42
+
43
+ /** Trust Task response type URI (request type URI + "#response"). */
44
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/profile/get/1.0#response" as const;
45
+
46
+ /** Stable alias for this specification's success-response payload shape. */
47
+ export type Response = PersonaProfileGetResponsePayload;
48
+
49
+ /**
50
+ * This specification's payload schema, as a value.
51
+ *
52
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
53
+ * rather than only as a `.json` file because TypeScript types are erased
54
+ * at runtime: without a schema a consumer has nothing to validate, and
55
+ * every REQUIRED payload member is optional in practice. Cross-file
56
+ * `$ref`s are already inlined, so it needs no resolver.
57
+ */
58
+ export const PAYLOAD_SCHEMA = {
59
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
60
+ "$id": "https://trusttasks.org/spec/persona/profile/get/1.0",
61
+ "title": "Persona Profile Get — payload",
62
+ "description": "Read one profile, either as composed (the entries the holder wrote) or as resolved (the claims it would actually present).",
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "profileId"
67
+ ],
68
+ "properties": {
69
+ "profileId": {
70
+ "$ref": "#/$defs/Ulid"
71
+ },
72
+ "resolve": {
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "When false (the default) the profile is returned as composed — entries as written, references unresolved. When true the maintainer resolves every entry against the pool and returns the claims the profile would present, which is what a preview renders and what a holder is really asking when they ask what a profile says. The default is the cheap, non-disclosing one."
76
+ },
77
+ "ext": {
78
+ "$ref": "#/$defs/Ext"
79
+ }
80
+ },
81
+ "$defs": {
82
+ "Response": {
83
+ "$anchor": "response",
84
+ "title": "Persona Profile Get — response payload",
85
+ "description": "Success response to persona/profile/get. Type https://trusttasks.org/spec/persona/profile/get/1.0#response.",
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "profile"
90
+ ],
91
+ "properties": {
92
+ "profile": {
93
+ "$ref": "#/$defs/Profile"
94
+ },
95
+ "resolved": {
96
+ "type": "array",
97
+ "maxItems": 256,
98
+ "items": {
99
+ "$ref": "#/$defs/Attribute"
100
+ },
101
+ "description": "Present only when `resolve` was true: the claims this profile would present, in entry order, with overrides applied and pinned versions honoured. A credential-backed claim whose backing could not be re-derived appears carrying `stale`, because a holder inspecting a profile needs to see that it has stopped being fully presentable."
102
+ },
103
+ "ext": {
104
+ "$ref": "#/$defs/Ext"
105
+ }
106
+ }
107
+ },
108
+ "Ext": {
109
+ "title": "Ext",
110
+ "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.",
111
+ "type": "object",
112
+ "minProperties": 1,
113
+ "additionalProperties": true,
114
+ "propertyNames": {
115
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
116
+ }
117
+ },
118
+ "Attribute": {
119
+ "title": "Attribute",
120
+ "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.",
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "attributeId",
125
+ "type",
126
+ "valueType",
127
+ "value",
128
+ "provenance",
129
+ "version",
130
+ "updatedAt"
131
+ ],
132
+ "properties": {
133
+ "attributeId": {
134
+ "$ref": "#/$defs/Ulid"
135
+ },
136
+ "type": {
137
+ "$ref": "#/$defs/ClaimType"
138
+ },
139
+ "valueType": {
140
+ "$ref": "#/$defs/ValueType"
141
+ },
142
+ "value": {
143
+ "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."
144
+ },
145
+ "label": {
146
+ "type": "string",
147
+ "maxLength": 128,
148
+ "description": "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self."
149
+ },
150
+ "provenance": {
151
+ "$ref": "#/$defs/Provenance"
152
+ },
153
+ "stale": {
154
+ "type": "boolean",
155
+ "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."
156
+ },
157
+ "staleReason": {
158
+ "type": "string",
159
+ "enum": [
160
+ "revoked",
161
+ "expired",
162
+ "archived",
163
+ "deleted",
164
+ "notFound"
165
+ ],
166
+ "description": "Why re-derivation failed. Present only alongside `stale`."
167
+ },
168
+ "version": {
169
+ "$ref": "#/$defs/Version"
170
+ },
171
+ "createdAt": {
172
+ "type": "string",
173
+ "format": "date-time"
174
+ },
175
+ "updatedAt": {
176
+ "type": "string",
177
+ "format": "date-time"
178
+ }
179
+ }
180
+ },
181
+ "Version": {
182
+ "title": "Version",
183
+ "description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
184
+ "type": "integer",
185
+ "minimum": 1
186
+ },
187
+ "Provenance": {
188
+ "title": "Provenance",
189
+ "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.",
190
+ "type": "object",
191
+ "required": [
192
+ "kind"
193
+ ],
194
+ "oneOf": [
195
+ {
196
+ "additionalProperties": false,
197
+ "required": [
198
+ "kind"
199
+ ],
200
+ "properties": {
201
+ "kind": {
202
+ "const": "selfAsserted"
203
+ }
204
+ }
205
+ },
206
+ {
207
+ "additionalProperties": false,
208
+ "required": [
209
+ "kind",
210
+ "credentialId",
211
+ "claimPath"
212
+ ],
213
+ "properties": {
214
+ "kind": {
215
+ "const": "credentialBacked"
216
+ },
217
+ "credentialId": {
218
+ "type": "string",
219
+ "minLength": 1,
220
+ "description": "Vault identifier of the backing credential."
221
+ },
222
+ "claimPath": {
223
+ "type": "string",
224
+ "pattern": "^(/[^/~]*(~[01][^/~]*)*)*$",
225
+ "description": "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`."
226
+ },
227
+ "issuerDid": {
228
+ "type": "string",
229
+ "minLength": 1,
230
+ "description": "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member."
231
+ },
232
+ "proof": {
233
+ "$ref": "#/$defs/ProofRung",
234
+ "description": "The disclosure rung this claim was, or will be, presented at."
235
+ }
236
+ }
237
+ },
238
+ {
239
+ "additionalProperties": false,
240
+ "required": [
241
+ "kind",
242
+ "generator"
243
+ ],
244
+ "properties": {
245
+ "kind": {
246
+ "const": "generated"
247
+ },
248
+ "generator": {
249
+ "type": "string",
250
+ "minLength": 1,
251
+ "maxLength": 64,
252
+ "description": "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined."
253
+ },
254
+ "perVerifier": {
255
+ "type": "boolean",
256
+ "default": true,
257
+ "description": "When true (the default and the only useful setting), a distinct value is minted for each verifier."
258
+ }
259
+ }
260
+ }
261
+ ]
262
+ },
263
+ "ProofRung": {
264
+ "title": "ProofRung",
265
+ "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.",
266
+ "type": "string",
267
+ "enum": [
268
+ "predicate",
269
+ "derived",
270
+ "selectiveDisclosure",
271
+ "whole"
272
+ ]
273
+ },
274
+ "ValueType": {
275
+ "title": "ValueType",
276
+ "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.",
277
+ "type": "string",
278
+ "enum": [
279
+ "string",
280
+ "number",
281
+ "boolean",
282
+ "date",
283
+ "object"
284
+ ]
285
+ },
286
+ "ClaimType": {
287
+ "title": "ClaimType",
288
+ "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.",
289
+ "type": "string",
290
+ "minLength": 1,
291
+ "maxLength": 128,
292
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
293
+ },
294
+ "Ulid": {
295
+ "title": "Ulid",
296
+ "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.",
297
+ "type": "string",
298
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
299
+ },
300
+ "Profile": {
301
+ "title": "Profile",
302
+ "description": "A named projection over the pool. Agent-scoped, like the pool it draws from. `entries` is ordered and the order is display order.",
303
+ "type": "object",
304
+ "additionalProperties": false,
305
+ "required": [
306
+ "profileId",
307
+ "name",
308
+ "entries",
309
+ "version",
310
+ "updatedAt"
311
+ ],
312
+ "properties": {
313
+ "profileId": {
314
+ "$ref": "#/$defs/Ulid"
315
+ },
316
+ "name": {
317
+ "type": "string",
318
+ "minLength": 1,
319
+ "maxLength": 128,
320
+ "description": "The holder's name for this profile — \"Work\", \"Gaming\". Not disclosed."
321
+ },
322
+ "entries": {
323
+ "type": "array",
324
+ "maxItems": 256,
325
+ "items": {
326
+ "$ref": "#/$defs/ProfileEntry"
327
+ }
328
+ },
329
+ "credentialRefs": {
330
+ "type": "array",
331
+ "maxItems": 256,
332
+ "items": {
333
+ "type": "string",
334
+ "minLength": 1
335
+ },
336
+ "description": "Vault identifiers of credentials associated with this profile as INVENTORY, distinct from the evidence relationship a `credentialBacked` attribute expresses. The two answer different questions — what can this persona prove, versus what backs this specific claim — and a consumer MUST NOT read one as the other."
337
+ },
338
+ "version": {
339
+ "$ref": "#/$defs/Version"
340
+ },
341
+ "createdAt": {
342
+ "type": "string",
343
+ "format": "date-time"
344
+ },
345
+ "updatedAt": {
346
+ "type": "string",
347
+ "format": "date-time"
348
+ }
349
+ }
350
+ },
351
+ "ProfileEntry": {
352
+ "title": "ProfileEntry",
353
+ "description": "One line of a profile, in exactly one of four forms. Together they are the whole of a profile's flexibility, and each exists for a case the others handle badly.\n\n`{ref}` — use the pool attribute, live. Editing the pool updates every profile that references it, which is the point.\n\n`{ref, pinVersion}` — use the value as it was at that version. For a profile that must keep presenting the value a counterparty already verified.\n\n`{ref, override}` — the same fact, a different value here. (\"In the gaming profile my display name is different.\")\n\n`{inline}` — a value that never enters the pool, and so never leaks into another profile.\n\nOmission is exclusion; there is no removal marker.",
354
+ "type": "object",
355
+ "oneOf": [
356
+ {
357
+ "additionalProperties": false,
358
+ "required": [
359
+ "ref"
360
+ ],
361
+ "properties": {
362
+ "ref": {
363
+ "$ref": "#/$defs/Ulid"
364
+ }
365
+ }
366
+ },
367
+ {
368
+ "additionalProperties": false,
369
+ "required": [
370
+ "ref",
371
+ "pinVersion"
372
+ ],
373
+ "properties": {
374
+ "ref": {
375
+ "$ref": "#/$defs/Ulid"
376
+ },
377
+ "pinVersion": {
378
+ "$ref": "#/$defs/Version"
379
+ }
380
+ }
381
+ },
382
+ {
383
+ "additionalProperties": false,
384
+ "required": [
385
+ "ref",
386
+ "override"
387
+ ],
388
+ "properties": {
389
+ "ref": {
390
+ "$ref": "#/$defs/Ulid"
391
+ },
392
+ "override": {
393
+ "type": "object",
394
+ "additionalProperties": false,
395
+ "required": [
396
+ "value"
397
+ ],
398
+ "properties": {
399
+ "value": {},
400
+ "label": {
401
+ "type": "string",
402
+ "maxLength": 128
403
+ }
404
+ },
405
+ "description": "Replaces the pool attribute's value for this profile only. `type`, `valueType` and `provenance` are inherited from the referenced attribute and MUST NOT be overridden — an override that changed provenance would let a self-asserted value present as attested."
406
+ }
407
+ }
408
+ },
409
+ {
410
+ "additionalProperties": false,
411
+ "required": [
412
+ "inline"
413
+ ],
414
+ "properties": {
415
+ "inline": {
416
+ "type": "object",
417
+ "additionalProperties": false,
418
+ "required": [
419
+ "type",
420
+ "valueType",
421
+ "value",
422
+ "provenance"
423
+ ],
424
+ "properties": {
425
+ "type": {
426
+ "$ref": "#/$defs/ClaimType"
427
+ },
428
+ "valueType": {
429
+ "$ref": "#/$defs/ValueType"
430
+ },
431
+ "value": {},
432
+ "label": {
433
+ "type": "string",
434
+ "maxLength": 128
435
+ },
436
+ "provenance": {
437
+ "$ref": "#/$defs/Provenance"
438
+ }
439
+ }
440
+ }
441
+ }
442
+ }
443
+ ]
444
+ }
445
+ }
446
+ } as const;
447
+
448
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
449
+ export const RESPONSE_PAYLOAD_SCHEMA = {
450
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
451
+ "$ref": "#/$defs/Response",
452
+ "$defs": {
453
+ "Response": {
454
+ "$anchor": "response",
455
+ "title": "Persona Profile Get — response payload",
456
+ "description": "Success response to persona/profile/get. Type https://trusttasks.org/spec/persona/profile/get/1.0#response.",
457
+ "type": "object",
458
+ "additionalProperties": false,
459
+ "required": [
460
+ "profile"
461
+ ],
462
+ "properties": {
463
+ "profile": {
464
+ "$ref": "#/$defs/Profile"
465
+ },
466
+ "resolved": {
467
+ "type": "array",
468
+ "maxItems": 256,
469
+ "items": {
470
+ "$ref": "#/$defs/Attribute"
471
+ },
472
+ "description": "Present only when `resolve` was true: the claims this profile would present, in entry order, with overrides applied and pinned versions honoured. A credential-backed claim whose backing could not be re-derived appears carrying `stale`, because a holder inspecting a profile needs to see that it has stopped being fully presentable."
473
+ },
474
+ "ext": {
475
+ "$ref": "#/$defs/Ext"
476
+ }
477
+ }
478
+ },
479
+ "Ext": {
480
+ "title": "Ext",
481
+ "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.",
482
+ "type": "object",
483
+ "minProperties": 1,
484
+ "additionalProperties": true,
485
+ "propertyNames": {
486
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
487
+ }
488
+ },
489
+ "Attribute": {
490
+ "title": "Attribute",
491
+ "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.",
492
+ "type": "object",
493
+ "additionalProperties": false,
494
+ "required": [
495
+ "attributeId",
496
+ "type",
497
+ "valueType",
498
+ "value",
499
+ "provenance",
500
+ "version",
501
+ "updatedAt"
502
+ ],
503
+ "properties": {
504
+ "attributeId": {
505
+ "$ref": "#/$defs/Ulid"
506
+ },
507
+ "type": {
508
+ "$ref": "#/$defs/ClaimType"
509
+ },
510
+ "valueType": {
511
+ "$ref": "#/$defs/ValueType"
512
+ },
513
+ "value": {
514
+ "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."
515
+ },
516
+ "label": {
517
+ "type": "string",
518
+ "maxLength": 128,
519
+ "description": "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self."
520
+ },
521
+ "provenance": {
522
+ "$ref": "#/$defs/Provenance"
523
+ },
524
+ "stale": {
525
+ "type": "boolean",
526
+ "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."
527
+ },
528
+ "staleReason": {
529
+ "type": "string",
530
+ "enum": [
531
+ "revoked",
532
+ "expired",
533
+ "archived",
534
+ "deleted",
535
+ "notFound"
536
+ ],
537
+ "description": "Why re-derivation failed. Present only alongside `stale`."
538
+ },
539
+ "version": {
540
+ "$ref": "#/$defs/Version"
541
+ },
542
+ "createdAt": {
543
+ "type": "string",
544
+ "format": "date-time"
545
+ },
546
+ "updatedAt": {
547
+ "type": "string",
548
+ "format": "date-time"
549
+ }
550
+ }
551
+ },
552
+ "Version": {
553
+ "title": "Version",
554
+ "description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
555
+ "type": "integer",
556
+ "minimum": 1
557
+ },
558
+ "Provenance": {
559
+ "title": "Provenance",
560
+ "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.",
561
+ "type": "object",
562
+ "required": [
563
+ "kind"
564
+ ],
565
+ "oneOf": [
566
+ {
567
+ "additionalProperties": false,
568
+ "required": [
569
+ "kind"
570
+ ],
571
+ "properties": {
572
+ "kind": {
573
+ "const": "selfAsserted"
574
+ }
575
+ }
576
+ },
577
+ {
578
+ "additionalProperties": false,
579
+ "required": [
580
+ "kind",
581
+ "credentialId",
582
+ "claimPath"
583
+ ],
584
+ "properties": {
585
+ "kind": {
586
+ "const": "credentialBacked"
587
+ },
588
+ "credentialId": {
589
+ "type": "string",
590
+ "minLength": 1,
591
+ "description": "Vault identifier of the backing credential."
592
+ },
593
+ "claimPath": {
594
+ "type": "string",
595
+ "pattern": "^(/[^/~]*(~[01][^/~]*)*)*$",
596
+ "description": "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`."
597
+ },
598
+ "issuerDid": {
599
+ "type": "string",
600
+ "minLength": 1,
601
+ "description": "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member."
602
+ },
603
+ "proof": {
604
+ "$ref": "#/$defs/ProofRung",
605
+ "description": "The disclosure rung this claim was, or will be, presented at."
606
+ }
607
+ }
608
+ },
609
+ {
610
+ "additionalProperties": false,
611
+ "required": [
612
+ "kind",
613
+ "generator"
614
+ ],
615
+ "properties": {
616
+ "kind": {
617
+ "const": "generated"
618
+ },
619
+ "generator": {
620
+ "type": "string",
621
+ "minLength": 1,
622
+ "maxLength": 64,
623
+ "description": "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined."
624
+ },
625
+ "perVerifier": {
626
+ "type": "boolean",
627
+ "default": true,
628
+ "description": "When true (the default and the only useful setting), a distinct value is minted for each verifier."
629
+ }
630
+ }
631
+ }
632
+ ]
633
+ },
634
+ "ProofRung": {
635
+ "title": "ProofRung",
636
+ "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.",
637
+ "type": "string",
638
+ "enum": [
639
+ "predicate",
640
+ "derived",
641
+ "selectiveDisclosure",
642
+ "whole"
643
+ ]
644
+ },
645
+ "ValueType": {
646
+ "title": "ValueType",
647
+ "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.",
648
+ "type": "string",
649
+ "enum": [
650
+ "string",
651
+ "number",
652
+ "boolean",
653
+ "date",
654
+ "object"
655
+ ]
656
+ },
657
+ "ClaimType": {
658
+ "title": "ClaimType",
659
+ "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.",
660
+ "type": "string",
661
+ "minLength": 1,
662
+ "maxLength": 128,
663
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
664
+ },
665
+ "Ulid": {
666
+ "title": "Ulid",
667
+ "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.",
668
+ "type": "string",
669
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
670
+ },
671
+ "Profile": {
672
+ "title": "Profile",
673
+ "description": "A named projection over the pool. Agent-scoped, like the pool it draws from. `entries` is ordered and the order is display order.",
674
+ "type": "object",
675
+ "additionalProperties": false,
676
+ "required": [
677
+ "profileId",
678
+ "name",
679
+ "entries",
680
+ "version",
681
+ "updatedAt"
682
+ ],
683
+ "properties": {
684
+ "profileId": {
685
+ "$ref": "#/$defs/Ulid"
686
+ },
687
+ "name": {
688
+ "type": "string",
689
+ "minLength": 1,
690
+ "maxLength": 128,
691
+ "description": "The holder's name for this profile — \"Work\", \"Gaming\". Not disclosed."
692
+ },
693
+ "entries": {
694
+ "type": "array",
695
+ "maxItems": 256,
696
+ "items": {
697
+ "$ref": "#/$defs/ProfileEntry"
698
+ }
699
+ },
700
+ "credentialRefs": {
701
+ "type": "array",
702
+ "maxItems": 256,
703
+ "items": {
704
+ "type": "string",
705
+ "minLength": 1
706
+ },
707
+ "description": "Vault identifiers of credentials associated with this profile as INVENTORY, distinct from the evidence relationship a `credentialBacked` attribute expresses. The two answer different questions — what can this persona prove, versus what backs this specific claim — and a consumer MUST NOT read one as the other."
708
+ },
709
+ "version": {
710
+ "$ref": "#/$defs/Version"
711
+ },
712
+ "createdAt": {
713
+ "type": "string",
714
+ "format": "date-time"
715
+ },
716
+ "updatedAt": {
717
+ "type": "string",
718
+ "format": "date-time"
719
+ }
720
+ }
721
+ },
722
+ "ProfileEntry": {
723
+ "title": "ProfileEntry",
724
+ "description": "One line of a profile, in exactly one of four forms. Together they are the whole of a profile's flexibility, and each exists for a case the others handle badly.\n\n`{ref}` — use the pool attribute, live. Editing the pool updates every profile that references it, which is the point.\n\n`{ref, pinVersion}` — use the value as it was at that version. For a profile that must keep presenting the value a counterparty already verified.\n\n`{ref, override}` — the same fact, a different value here. (\"In the gaming profile my display name is different.\")\n\n`{inline}` — a value that never enters the pool, and so never leaks into another profile.\n\nOmission is exclusion; there is no removal marker.",
725
+ "type": "object",
726
+ "oneOf": [
727
+ {
728
+ "additionalProperties": false,
729
+ "required": [
730
+ "ref"
731
+ ],
732
+ "properties": {
733
+ "ref": {
734
+ "$ref": "#/$defs/Ulid"
735
+ }
736
+ }
737
+ },
738
+ {
739
+ "additionalProperties": false,
740
+ "required": [
741
+ "ref",
742
+ "pinVersion"
743
+ ],
744
+ "properties": {
745
+ "ref": {
746
+ "$ref": "#/$defs/Ulid"
747
+ },
748
+ "pinVersion": {
749
+ "$ref": "#/$defs/Version"
750
+ }
751
+ }
752
+ },
753
+ {
754
+ "additionalProperties": false,
755
+ "required": [
756
+ "ref",
757
+ "override"
758
+ ],
759
+ "properties": {
760
+ "ref": {
761
+ "$ref": "#/$defs/Ulid"
762
+ },
763
+ "override": {
764
+ "type": "object",
765
+ "additionalProperties": false,
766
+ "required": [
767
+ "value"
768
+ ],
769
+ "properties": {
770
+ "value": {},
771
+ "label": {
772
+ "type": "string",
773
+ "maxLength": 128
774
+ }
775
+ },
776
+ "description": "Replaces the pool attribute's value for this profile only. `type`, `valueType` and `provenance` are inherited from the referenced attribute and MUST NOT be overridden — an override that changed provenance would let a self-asserted value present as attested."
777
+ }
778
+ }
779
+ },
780
+ {
781
+ "additionalProperties": false,
782
+ "required": [
783
+ "inline"
784
+ ],
785
+ "properties": {
786
+ "inline": {
787
+ "type": "object",
788
+ "additionalProperties": false,
789
+ "required": [
790
+ "type",
791
+ "valueType",
792
+ "value",
793
+ "provenance"
794
+ ],
795
+ "properties": {
796
+ "type": {
797
+ "$ref": "#/$defs/ClaimType"
798
+ },
799
+ "valueType": {
800
+ "$ref": "#/$defs/ValueType"
801
+ },
802
+ "value": {},
803
+ "label": {
804
+ "type": "string",
805
+ "maxLength": 128
806
+ },
807
+ "provenance": {
808
+ "$ref": "#/$defs/Provenance"
809
+ }
810
+ }
811
+ }
812
+ }
813
+ }
814
+ ]
815
+ }
816
+ }
817
+ } as const;
818
+
819
+ /**
820
+ * SPEC.md §7.2 policy for the request variant, from this specification's
821
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
822
+ * per-specification and cannot be derived from the document alone, and
823
+ * item 2 needs the schema this carries.
824
+ */
825
+ export const SPEC = {
826
+ typeUri: TYPE_URI,
827
+ isBearer: false,
828
+ isProofRequired: true,
829
+ isRecipientRequired: true,
830
+ isIssuedAtRequired: false,
831
+ payloadSchema: PAYLOAD_SCHEMA,
832
+ } as const;
833
+
834
+ /**
835
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
836
+ * tracks the *issuer* party's requirement because a response swaps the
837
+ * parties (§7.3 item 5).
838
+ */
839
+ export const RESPONSE_SPEC = {
840
+ typeUri: RESPONSE_TYPE_URI,
841
+ isBearer: false,
842
+ isProofRequired: true,
843
+ isRecipientRequired: true,
844
+ isIssuedAtRequired: false,
845
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
846
+ } as const;