@openvtc/trust-tasks 0.16.9 → 0.16.11

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 +220 -0
  2. package/dist/_shared/components.d.ts +206 -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 +530 -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 +802 -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 +213 -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 +588 -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 +844 -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,466 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/correlation/analyze/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { ClaimType, Ext, Ulid, ValueType } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Report where the holder's identities link to one another, and what can be done about each link. The findings task behind the counts the write tasks return.
11
+ */
12
+ export interface PersonaCorrelationAnalyzePayload {
13
+ /**
14
+ * Analyse one attribute. Omit to analyse the whole pool.
15
+ */
16
+ attributeId?: Ulid;
17
+ /**
18
+ * Analyse one composition — what would this profile link if bound.
19
+ */
20
+ profileId?: Ulid;
21
+ /**
22
+ * Analyse a value the holder is CONSIDERING but has not written. This is what lets a builder warn before the mistake rather than after it, which is the difference between a guard and a report. A maintainer MUST NOT store a candidate.
23
+ */
24
+ candidate?: {
25
+ type: ClaimType;
26
+ valueType: ValueType;
27
+ value: unknown;
28
+ };
29
+ ext?: Ext;
30
+ }
31
+ /**
32
+ * Success response to persona/correlation/analyze. Type https://trusttasks.org/spec/persona/correlation/analyze/1.0#response.
33
+ */
34
+ export interface PersonaCorrelationAnalyzeResponsePayload {
35
+ /**
36
+ * @maxItems 256
37
+ */
38
+ findings: {
39
+ attributeId?: Ulid;
40
+ severity: "low" | "high";
41
+ /**
42
+ * Where else this value appears, and where it has actually gone. Identifiers ARE returned here, unlike the counts the write tasks give back — this task is holder-authorized and its whole purpose is to let the holder act, which they cannot do on a number.
43
+ *
44
+ * @maxItems 128
45
+ */
46
+ sharedWith?: {
47
+ profileId?: Ulid;
48
+ contextId?: string;
49
+ personaDid?: string;
50
+ /**
51
+ * @maxItems 64
52
+ */
53
+ disclosedTo?: string[];
54
+ }[];
55
+ /**
56
+ * Plain-language cause. A severity with no explanation is a warning a holder learns to dismiss.
57
+ */
58
+ why: string;
59
+ /**
60
+ * What the holder can actually do. Naming reissueCredentialToThisDid matters more than it looks: without it, a holder told 'this links your personas' has no action but to abandon the attribute, and the honest fix — a credential re-issued against the persona actually using it — stays invisible unless the analysis names it.
61
+ *
62
+ * @maxItems 8
63
+ */
64
+ remedies:
65
+ | []
66
+ | ["useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"]
67
+ | [
68
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
69
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
70
+ ]
71
+ | [
72
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
73
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
74
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
75
+ ]
76
+ | [
77
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
78
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
79
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
80
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
81
+ ]
82
+ | [
83
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
84
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
85
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
86
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
87
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
88
+ ]
89
+ | [
90
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
91
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
92
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
93
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
94
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
95
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
96
+ ]
97
+ | [
98
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
99
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
100
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
101
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
102
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
103
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
104
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
105
+ ]
106
+ | [
107
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
108
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
109
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
110
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
111
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
112
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
113
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord",
114
+ "useDifferentValue" | "reissueCredentialToThisDid" | "correlateDeliberately" | "proceedAndRecord"
115
+ ];
116
+ }[];
117
+ ext?: Ext;
118
+ }
119
+
120
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
121
+ export type { ClaimType, Ext, Ulid, ValueType };
122
+
123
+ /** Trust Task type URI. */
124
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/correlation/analyze/1.0" as const;
125
+
126
+ /** Stable alias for this specification's request payload shape. */
127
+ export type Payload = PersonaCorrelationAnalyzePayload;
128
+
129
+ /** Trust Task response type URI (request type URI + "#response"). */
130
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/correlation/analyze/1.0#response" as const;
131
+
132
+ /** Stable alias for this specification's success-response payload shape. */
133
+ export type Response = PersonaCorrelationAnalyzeResponsePayload;
134
+
135
+ /**
136
+ * This specification's payload schema, as a value.
137
+ *
138
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
139
+ * rather than only as a `.json` file because TypeScript types are erased
140
+ * at runtime: without a schema a consumer has nothing to validate, and
141
+ * every REQUIRED payload member is optional in practice. Cross-file
142
+ * `$ref`s are already inlined, so it needs no resolver.
143
+ */
144
+ export const PAYLOAD_SCHEMA = {
145
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
146
+ "$id": "https://trusttasks.org/spec/persona/correlation/analyze/1.0",
147
+ "title": "Persona Correlation Analyze — payload",
148
+ "description": "Report where the holder's identities link to one another, and what can be done about each link. The findings task behind the counts the write tasks return.",
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "properties": {
152
+ "attributeId": {
153
+ "$ref": "#/$defs/Ulid",
154
+ "description": "Analyse one attribute. Omit to analyse the whole pool."
155
+ },
156
+ "profileId": {
157
+ "$ref": "#/$defs/Ulid",
158
+ "description": "Analyse one composition — what would this profile link if bound."
159
+ },
160
+ "candidate": {
161
+ "type": "object",
162
+ "additionalProperties": false,
163
+ "required": [
164
+ "type",
165
+ "valueType",
166
+ "value"
167
+ ],
168
+ "description": "Analyse a value the holder is CONSIDERING but has not written. This is what lets a builder warn before the mistake rather than after it, which is the difference between a guard and a report. A maintainer MUST NOT store a candidate.",
169
+ "properties": {
170
+ "type": {
171
+ "$ref": "#/$defs/ClaimType"
172
+ },
173
+ "valueType": {
174
+ "$ref": "#/$defs/ValueType"
175
+ },
176
+ "value": {}
177
+ }
178
+ },
179
+ "ext": {
180
+ "$ref": "#/$defs/Ext"
181
+ }
182
+ },
183
+ "$defs": {
184
+ "Response": {
185
+ "$anchor": "response",
186
+ "title": "Persona Correlation Analyze — response payload",
187
+ "description": "Success response to persona/correlation/analyze. Type https://trusttasks.org/spec/persona/correlation/analyze/1.0#response.",
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "required": [
191
+ "findings"
192
+ ],
193
+ "properties": {
194
+ "findings": {
195
+ "type": "array",
196
+ "maxItems": 256,
197
+ "items": {
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "required": [
201
+ "severity",
202
+ "why",
203
+ "remedies"
204
+ ],
205
+ "properties": {
206
+ "attributeId": {
207
+ "$ref": "#/$defs/Ulid"
208
+ },
209
+ "severity": {
210
+ "type": "string",
211
+ "enum": [
212
+ "low",
213
+ "high"
214
+ ]
215
+ },
216
+ "sharedWith": {
217
+ "type": "array",
218
+ "maxItems": 128,
219
+ "description": "Where else this value appears, and where it has actually gone. Identifiers ARE returned here, unlike the counts the write tasks give back — this task is holder-authorized and its whole purpose is to let the holder act, which they cannot do on a number.",
220
+ "items": {
221
+ "type": "object",
222
+ "additionalProperties": false,
223
+ "properties": {
224
+ "profileId": {
225
+ "$ref": "#/$defs/Ulid"
226
+ },
227
+ "contextId": {
228
+ "type": "string"
229
+ },
230
+ "personaDid": {
231
+ "type": "string"
232
+ },
233
+ "disclosedTo": {
234
+ "type": "array",
235
+ "maxItems": 64,
236
+ "items": {
237
+ "type": "string"
238
+ }
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "why": {
244
+ "type": "string",
245
+ "maxLength": 1024,
246
+ "description": "Plain-language cause. A severity with no explanation is a warning a holder learns to dismiss."
247
+ },
248
+ "remedies": {
249
+ "type": "array",
250
+ "maxItems": 8,
251
+ "items": {
252
+ "type": "string",
253
+ "enum": [
254
+ "useDifferentValue",
255
+ "reissueCredentialToThisDid",
256
+ "correlateDeliberately",
257
+ "proceedAndRecord"
258
+ ]
259
+ },
260
+ "description": "What the holder can actually do. Naming reissueCredentialToThisDid matters more than it looks: without it, a holder told 'this links your personas' has no action but to abandon the attribute, and the honest fix — a credential re-issued against the persona actually using it — stays invisible unless the analysis names it."
261
+ }
262
+ }
263
+ }
264
+ },
265
+ "ext": {
266
+ "$ref": "#/$defs/Ext"
267
+ }
268
+ }
269
+ },
270
+ "Ext": {
271
+ "title": "Ext",
272
+ "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.",
273
+ "type": "object",
274
+ "minProperties": 1,
275
+ "additionalProperties": true,
276
+ "propertyNames": {
277
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
278
+ }
279
+ },
280
+ "Ulid": {
281
+ "title": "Ulid",
282
+ "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.",
283
+ "type": "string",
284
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
285
+ },
286
+ "ValueType": {
287
+ "title": "ValueType",
288
+ "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.",
289
+ "type": "string",
290
+ "enum": [
291
+ "string",
292
+ "number",
293
+ "boolean",
294
+ "date",
295
+ "object"
296
+ ]
297
+ },
298
+ "ClaimType": {
299
+ "title": "ClaimType",
300
+ "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.",
301
+ "type": "string",
302
+ "minLength": 1,
303
+ "maxLength": 128,
304
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
305
+ }
306
+ }
307
+ } as const;
308
+
309
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
310
+ export const RESPONSE_PAYLOAD_SCHEMA = {
311
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
312
+ "$ref": "#/$defs/Response",
313
+ "$defs": {
314
+ "Response": {
315
+ "$anchor": "response",
316
+ "title": "Persona Correlation Analyze — response payload",
317
+ "description": "Success response to persona/correlation/analyze. Type https://trusttasks.org/spec/persona/correlation/analyze/1.0#response.",
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "required": [
321
+ "findings"
322
+ ],
323
+ "properties": {
324
+ "findings": {
325
+ "type": "array",
326
+ "maxItems": 256,
327
+ "items": {
328
+ "type": "object",
329
+ "additionalProperties": false,
330
+ "required": [
331
+ "severity",
332
+ "why",
333
+ "remedies"
334
+ ],
335
+ "properties": {
336
+ "attributeId": {
337
+ "$ref": "#/$defs/Ulid"
338
+ },
339
+ "severity": {
340
+ "type": "string",
341
+ "enum": [
342
+ "low",
343
+ "high"
344
+ ]
345
+ },
346
+ "sharedWith": {
347
+ "type": "array",
348
+ "maxItems": 128,
349
+ "description": "Where else this value appears, and where it has actually gone. Identifiers ARE returned here, unlike the counts the write tasks give back — this task is holder-authorized and its whole purpose is to let the holder act, which they cannot do on a number.",
350
+ "items": {
351
+ "type": "object",
352
+ "additionalProperties": false,
353
+ "properties": {
354
+ "profileId": {
355
+ "$ref": "#/$defs/Ulid"
356
+ },
357
+ "contextId": {
358
+ "type": "string"
359
+ },
360
+ "personaDid": {
361
+ "type": "string"
362
+ },
363
+ "disclosedTo": {
364
+ "type": "array",
365
+ "maxItems": 64,
366
+ "items": {
367
+ "type": "string"
368
+ }
369
+ }
370
+ }
371
+ }
372
+ },
373
+ "why": {
374
+ "type": "string",
375
+ "maxLength": 1024,
376
+ "description": "Plain-language cause. A severity with no explanation is a warning a holder learns to dismiss."
377
+ },
378
+ "remedies": {
379
+ "type": "array",
380
+ "maxItems": 8,
381
+ "items": {
382
+ "type": "string",
383
+ "enum": [
384
+ "useDifferentValue",
385
+ "reissueCredentialToThisDid",
386
+ "correlateDeliberately",
387
+ "proceedAndRecord"
388
+ ]
389
+ },
390
+ "description": "What the holder can actually do. Naming reissueCredentialToThisDid matters more than it looks: without it, a holder told 'this links your personas' has no action but to abandon the attribute, and the honest fix — a credential re-issued against the persona actually using it — stays invisible unless the analysis names it."
391
+ }
392
+ }
393
+ }
394
+ },
395
+ "ext": {
396
+ "$ref": "#/$defs/Ext"
397
+ }
398
+ }
399
+ },
400
+ "Ext": {
401
+ "title": "Ext",
402
+ "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.",
403
+ "type": "object",
404
+ "minProperties": 1,
405
+ "additionalProperties": true,
406
+ "propertyNames": {
407
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
408
+ }
409
+ },
410
+ "Ulid": {
411
+ "title": "Ulid",
412
+ "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.",
413
+ "type": "string",
414
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
415
+ },
416
+ "ValueType": {
417
+ "title": "ValueType",
418
+ "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.",
419
+ "type": "string",
420
+ "enum": [
421
+ "string",
422
+ "number",
423
+ "boolean",
424
+ "date",
425
+ "object"
426
+ ]
427
+ },
428
+ "ClaimType": {
429
+ "title": "ClaimType",
430
+ "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.",
431
+ "type": "string",
432
+ "minLength": 1,
433
+ "maxLength": 128,
434
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
435
+ }
436
+ }
437
+ } as const;
438
+
439
+ /**
440
+ * SPEC.md §7.2 policy for the request variant, from this specification's
441
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
442
+ * per-specification and cannot be derived from the document alone, and
443
+ * item 2 needs the schema this carries.
444
+ */
445
+ export const SPEC = {
446
+ typeUri: TYPE_URI,
447
+ isBearer: false,
448
+ isProofRequired: true,
449
+ isRecipientRequired: true,
450
+ isIssuedAtRequired: false,
451
+ payloadSchema: PAYLOAD_SCHEMA,
452
+ } as const;
453
+
454
+ /**
455
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
456
+ * tracks the *issuer* party's requirement because a response swaps the
457
+ * parties (§7.3 item 5).
458
+ */
459
+ export const RESPONSE_SPEC = {
460
+ typeUri: RESPONSE_TYPE_URI,
461
+ isBearer: false,
462
+ isProofRequired: true,
463
+ isRecipientRequired: true,
464
+ isIssuedAtRequired: false,
465
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
466
+ } as const;