@openvtc/trust-tasks 0.19.17 → 0.19.19

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 (127) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/_runtime/consume.d.ts +1 -1
  3. package/dist/_runtime/consume.js +2 -2
  4. package/dist/_shared/components.d.ts +46 -0
  5. package/dist/_shared/components.d.ts.map +1 -1
  6. package/dist/index.d.ts +8 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +8 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
  11. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
  12. package/dist/persona/attribute/list/1.0/payload.d.ts +124 -4
  13. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -1
  14. package/dist/persona/attribute/list/1.0/payload.js +72 -2
  15. package/dist/persona/attribute/list/1.0/payload.js.map +1 -1
  16. package/dist/persona/attribute/promote/1.0/payload.d.ts +506 -0
  17. package/dist/persona/attribute/promote/1.0/payload.d.ts.map +1 -0
  18. package/dist/persona/attribute/promote/1.0/payload.js +263 -0
  19. package/dist/persona/attribute/promote/1.0/payload.js.map +1 -0
  20. package/dist/persona/attribute/put/1.0/payload.d.ts +110 -4
  21. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -1
  22. package/dist/persona/attribute/put/1.0/payload.js +62 -2
  23. package/dist/persona/attribute/put/1.0/payload.js.map +1 -1
  24. package/dist/persona/binding/get/1.0/payload.d.ts +24 -0
  25. package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -1
  26. package/dist/persona/binding/get/1.0/payload.js +10 -0
  27. package/dist/persona/binding/get/1.0/payload.js.map +1 -1
  28. package/dist/persona/binding/list/1.0/payload.d.ts +24 -0
  29. package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -1
  30. package/dist/persona/binding/list/1.0/payload.js +10 -0
  31. package/dist/persona/binding/list/1.0/payload.js.map +1 -1
  32. package/dist/persona/binding/set/1.0/payload.d.ts +38 -0
  33. package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -1
  34. package/dist/persona/binding/set/1.0/payload.js +15 -0
  35. package/dist/persona/binding/set/1.0/payload.js.map +1 -1
  36. package/dist/persona/contact/get/1.0/payload.d.ts +84 -4
  37. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -1
  38. package/dist/persona/contact/get/1.0/payload.js +52 -2
  39. package/dist/persona/contact/get/1.0/payload.js.map +1 -1
  40. package/dist/persona/contact/put/1.0/payload.d.ts +84 -4
  41. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -1
  42. package/dist/persona/contact/put/1.0/payload.js +52 -2
  43. package/dist/persona/contact/put/1.0/payload.js.map +1 -1
  44. package/dist/persona/disclosure/preview/1.0/payload.d.ts +5 -5
  45. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -1
  46. package/dist/persona/disclosure/preview/1.0/payload.js +4 -2
  47. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -1
  48. package/dist/persona/local/binding/set/1.0/payload.d.ts +14 -0
  49. package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -1
  50. package/dist/persona/local/binding/set/1.0/payload.js +5 -0
  51. package/dist/persona/local/binding/set/1.0/payload.js.map +1 -1
  52. package/dist/persona/profile/compose/1.0/payload.d.ts +965 -0
  53. package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -0
  54. package/dist/persona/profile/compose/1.0/payload.js +531 -0
  55. package/dist/persona/profile/compose/1.0/payload.js.map +1 -0
  56. package/dist/persona/profile/delete/1.0/payload.d.ts +71 -0
  57. package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -1
  58. package/dist/persona/profile/delete/1.0/payload.js +38 -0
  59. package/dist/persona/profile/delete/1.0/payload.js.map +1 -1
  60. package/dist/persona/profile/get/1.0/payload.d.ts +345 -6
  61. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
  62. package/dist/persona/profile/get/1.0/payload.js +206 -2
  63. package/dist/persona/profile/get/1.0/payload.js.map +1 -1
  64. package/dist/persona/profile/list/1.0/payload.d.ts +288 -6
  65. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
  66. package/dist/persona/profile/list/1.0/payload.js +173 -2
  67. package/dist/persona/profile/list/1.0/payload.js.map +1 -1
  68. package/dist/persona/profile/put/1.0/payload.d.ts +230 -6
  69. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -1
  70. package/dist/persona/profile/put/1.0/payload.js +138 -2
  71. package/dist/persona/profile/put/1.0/payload.js.map +1 -1
  72. package/dist/persona/profile/reinstate/1.0/payload.d.ts +325 -0
  73. package/dist/persona/profile/reinstate/1.0/payload.d.ts.map +1 -0
  74. package/dist/persona/profile/reinstate/1.0/payload.js +181 -0
  75. package/dist/persona/profile/reinstate/1.0/payload.js.map +1 -0
  76. package/dist/persona/profile/retire/1.0/payload.d.ts +436 -0
  77. package/dist/persona/profile/retire/1.0/payload.d.ts.map +1 -0
  78. package/dist/persona/profile/retire/1.0/payload.js +238 -0
  79. package/dist/persona/profile/retire/1.0/payload.js.map +1 -0
  80. package/dist/persona/profile/timeline/1.0/payload.d.ts +588 -0
  81. package/dist/persona/profile/timeline/1.0/payload.d.ts.map +1 -0
  82. package/dist/persona/profile/timeline/1.0/payload.js +322 -0
  83. package/dist/persona/profile/timeline/1.0/payload.js.map +1 -0
  84. package/dist/persona/profile/usage/1.0/payload.d.ts +533 -0
  85. package/dist/persona/profile/usage/1.0/payload.d.ts.map +1 -0
  86. package/dist/persona/profile/usage/1.0/payload.js +302 -0
  87. package/dist/persona/profile/usage/1.0/payload.js.map +1 -0
  88. package/dist/trust-task-control/0.1/payload.d.ts +19 -19
  89. package/dist/trust-task-control/0.1/payload.js +7 -7
  90. package/dist/trust-task-discovery/0.1/payload.d.ts +3 -3
  91. package/dist/trust-task-discovery/0.1/payload.js +1 -1
  92. package/dist/trust-task-discovery/0.2/payload.d.ts +368 -0
  93. package/dist/trust-task-discovery/0.2/payload.d.ts.map +1 -0
  94. package/dist/trust-task-discovery/0.2/payload.js +186 -0
  95. package/dist/trust-task-discovery/0.2/payload.js.map +1 -0
  96. package/dist/vtc/invitations/deliver/0.1/payload.d.ts +318 -0
  97. package/dist/vtc/invitations/deliver/0.1/payload.d.ts.map +1 -0
  98. package/dist/vtc/invitations/deliver/0.1/payload.js +183 -0
  99. package/dist/vtc/invitations/deliver/0.1/payload.js.map +1 -0
  100. package/package.json +1 -1
  101. package/src/_runtime/consume.ts +2 -2
  102. package/src/_shared/components.ts +49 -0
  103. package/src/index.ts +8 -0
  104. package/src/persona/_shared/0.1/persona-record.ts +1 -1
  105. package/src/persona/attribute/list/1.0/payload.ts +72 -2
  106. package/src/persona/attribute/promote/1.0/payload.ts +344 -0
  107. package/src/persona/attribute/put/1.0/payload.ts +68 -2
  108. package/src/persona/binding/get/1.0/payload.ts +14 -0
  109. package/src/persona/binding/list/1.0/payload.ts +14 -0
  110. package/src/persona/binding/set/1.0/payload.ts +23 -0
  111. package/src/persona/contact/get/1.0/payload.ts +52 -2
  112. package/src/persona/contact/put/1.0/payload.ts +52 -2
  113. package/src/persona/disclosure/preview/1.0/payload.ts +5 -3
  114. package/src/persona/local/binding/set/1.0/payload.ts +9 -0
  115. package/src/persona/profile/compose/1.0/payload.ts +650 -0
  116. package/src/persona/profile/delete/1.0/payload.ts +45 -0
  117. package/src/persona/profile/get/1.0/payload.ts +215 -4
  118. package/src/persona/profile/list/1.0/payload.ts +179 -4
  119. package/src/persona/profile/put/1.0/payload.ts +144 -4
  120. package/src/persona/profile/reinstate/1.0/payload.ts +219 -0
  121. package/src/persona/profile/retire/1.0/payload.ts +289 -0
  122. package/src/persona/profile/timeline/1.0/payload.ts +402 -0
  123. package/src/persona/profile/usage/1.0/payload.ts +354 -0
  124. package/src/trust-task-control/0.1/payload.ts +12 -12
  125. package/src/trust-task-discovery/0.1/payload.ts +2 -2
  126. package/src/trust-task-discovery/0.2/payload.ts +286 -0
  127. package/src/vtc/invitations/deliver/0.1/payload.ts +234 -0
@@ -0,0 +1,650 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/profile/compose/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { ClaimType, Ext, Slot, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * One claim of the face being composed: a value typed now, or an attribute the holder already keeps.
11
+ */
12
+ export type ComposeClaim = NewClaim | HeldClaim;
13
+
14
+ /**
15
+ * Compose a face for one context, where it is needed, from values typed now and attributes already held — and optionally wear it there in the same act. Local by default: a value typed here stays in this context unless the holder says it should be reusable. Where the face lives follows from what it carries, so there is no scope parameter to get wrong.
16
+ */
17
+ export interface PersonaProfileComposePayload {
18
+ /**
19
+ * The context the face is composed for. A face whose every claim is local lives in this context and nowhere else; a face carrying any pool claim lives above contexts, and is bound into this one when `personaDid` is given.
20
+ */
21
+ contextId: string;
22
+ /**
23
+ * The holder's name for the face. Never disclosed; what a context may call the face is `label`.
24
+ */
25
+ name: string;
26
+ /**
27
+ * Ordered; the order is display order.
28
+ *
29
+ * @minItems 1
30
+ * @maxItems 64
31
+ */
32
+ claims: [ComposeClaim, ...ComposeClaim[]];
33
+ /**
34
+ * Wear the new face as this persona in `contextId`, in the same act. Omit to compose without wearing it.
35
+ */
36
+ personaDid?: string;
37
+ /**
38
+ * What the context may call the face, as on persona/binding/set. Meaningful only with `personaDid`; a maintainer MUST refuse it without one rather than drop it.
39
+ */
40
+ label?: string;
41
+ /**
42
+ * When wearing the face here ends on its own, as persona/binding/set `until`: at it the binding clears and the face, if worn nowhere else, is retired — never deleted. For the face composed at the door of a conference or a listing, which is where a throwaway face is usually made. Meaningful only with `personaDid`, and refused without one or in the past (`untilNotFuture`).
43
+ */
44
+ until?: string;
45
+ ext?: Ext;
46
+ }
47
+ /**
48
+ * A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.
49
+ */
50
+ export interface NewClaim {
51
+ type: ClaimType;
52
+ valueType: ValueType;
53
+ value: unknown;
54
+ /**
55
+ * The holder's note to self for this value. Never disclosed.
56
+ */
57
+ label?: string;
58
+ slot?: Slot;
59
+ /**
60
+ * `local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists.
61
+ */
62
+ share?: "local" | "pool";
63
+ }
64
+ /**
65
+ * An attribute already in the holder's pool, presented live.
66
+ */
67
+ export interface HeldClaim {
68
+ attributeId: Ulid;
69
+ slot?: Slot;
70
+ }
71
+ /**
72
+ * Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.
73
+ */
74
+ export interface PersonaProfileComposeResponsePayload {
75
+ profileId: Ulid;
76
+ /**
77
+ * Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later.
78
+ */
79
+ scope: "local" | "pool";
80
+ version: Version;
81
+ /**
82
+ * For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.
83
+ *
84
+ * @maxItems 64
85
+ */
86
+ pooled?: {
87
+ attributeId: Ulid;
88
+ created: boolean;
89
+ }[];
90
+ /**
91
+ * Present when `personaDid` was given: the face is now worn there.
92
+ */
93
+ binding?: {
94
+ personaDid: string;
95
+ version: Version;
96
+ /**
97
+ * How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set.
98
+ */
99
+ alsoBoundPersonaCount?: number;
100
+ };
101
+ /**
102
+ * Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.
103
+ */
104
+ correlation?: {
105
+ severity: "none" | "low" | "high";
106
+ sharedAttributeCount?: number;
107
+ };
108
+ ext?: Ext;
109
+ }
110
+
111
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
112
+ export type { ClaimType, Ext, Slot, Ulid, ValueType, Version };
113
+
114
+ /** Trust Task type URI. */
115
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/compose/1.0" as const;
116
+
117
+ /** Stable alias for this specification's request payload shape. */
118
+ export type Payload = PersonaProfileComposePayload;
119
+
120
+ /** Trust Task response type URI (request type URI + "#response"). */
121
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/profile/compose/1.0#response" as const;
122
+
123
+ /** Stable alias for this specification's success-response payload shape. */
124
+ export type Response = PersonaProfileComposeResponsePayload;
125
+
126
+ /**
127
+ * This specification's payload schema, as a value.
128
+ *
129
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
130
+ * rather than only as a `.json` file because TypeScript types are erased
131
+ * at runtime: without a schema a consumer has nothing to validate, and
132
+ * every REQUIRED payload member is optional in practice. Cross-file
133
+ * `$ref`s are already inlined, so it needs no resolver.
134
+ */
135
+ export const PAYLOAD_SCHEMA = {
136
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
137
+ "$id": "https://trusttasks.org/spec/persona/profile/compose/1.0",
138
+ "title": "Persona Profile Compose — payload",
139
+ "description": "Compose a face for one context, where it is needed, from values typed now and attributes already held — and optionally wear it there in the same act. Local by default: a value typed here stays in this context unless the holder says it should be reusable. Where the face lives follows from what it carries, so there is no scope parameter to get wrong.",
140
+ "type": "object",
141
+ "additionalProperties": false,
142
+ "required": [
143
+ "contextId",
144
+ "name",
145
+ "claims"
146
+ ],
147
+ "properties": {
148
+ "contextId": {
149
+ "type": "string",
150
+ "minLength": 1,
151
+ "description": "The context the face is composed for. A face whose every claim is local lives in this context and nowhere else; a face carrying any pool claim lives above contexts, and is bound into this one when `personaDid` is given."
152
+ },
153
+ "name": {
154
+ "type": "string",
155
+ "minLength": 1,
156
+ "maxLength": 128,
157
+ "description": "The holder's name for the face. Never disclosed; what a context may call the face is `label`."
158
+ },
159
+ "claims": {
160
+ "type": "array",
161
+ "minItems": 1,
162
+ "maxItems": 64,
163
+ "items": {
164
+ "$ref": "#/$defs/ComposeClaim"
165
+ },
166
+ "description": "Ordered; the order is display order."
167
+ },
168
+ "personaDid": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 2048,
172
+ "description": "Wear the new face as this persona in `contextId`, in the same act. Omit to compose without wearing it."
173
+ },
174
+ "label": {
175
+ "type": "string",
176
+ "minLength": 1,
177
+ "maxLength": 128,
178
+ "description": "What the context may call the face, as on persona/binding/set. Meaningful only with `personaDid`; a maintainer MUST refuse it without one rather than drop it."
179
+ },
180
+ "until": {
181
+ "type": "string",
182
+ "format": "date-time",
183
+ "description": "When wearing the face here ends on its own, as persona/binding/set `until`: at it the binding clears and the face, if worn nowhere else, is retired — never deleted. For the face composed at the door of a conference or a listing, which is where a throwaway face is usually made. Meaningful only with `personaDid`, and refused without one or in the past (`untilNotFuture`)."
184
+ },
185
+ "ext": {
186
+ "$ref": "#/$defs/Ext"
187
+ }
188
+ },
189
+ "$defs": {
190
+ "ComposeClaim": {
191
+ "title": "ComposeClaim",
192
+ "description": "One claim of the face being composed: a value typed now, or an attribute the holder already keeps.",
193
+ "oneOf": [
194
+ {
195
+ "$ref": "#/$defs/NewClaim"
196
+ },
197
+ {
198
+ "$ref": "#/$defs/HeldClaim"
199
+ }
200
+ ]
201
+ },
202
+ "NewClaim": {
203
+ "title": "NewClaim",
204
+ "description": "A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.",
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": [
208
+ "type",
209
+ "valueType",
210
+ "value"
211
+ ],
212
+ "properties": {
213
+ "type": {
214
+ "$ref": "#/$defs/ClaimType"
215
+ },
216
+ "valueType": {
217
+ "$ref": "#/$defs/ValueType"
218
+ },
219
+ "value": {},
220
+ "label": {
221
+ "type": "string",
222
+ "maxLength": 128,
223
+ "description": "The holder's note to self for this value. Never disclosed."
224
+ },
225
+ "slot": {
226
+ "$ref": "#/$defs/Slot"
227
+ },
228
+ "share": {
229
+ "type": "string",
230
+ "enum": [
231
+ "local",
232
+ "pool"
233
+ ],
234
+ "default": "local",
235
+ "description": "`local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists."
236
+ }
237
+ }
238
+ },
239
+ "HeldClaim": {
240
+ "title": "HeldClaim",
241
+ "description": "An attribute already in the holder's pool, presented live.",
242
+ "type": "object",
243
+ "additionalProperties": false,
244
+ "required": [
245
+ "attributeId"
246
+ ],
247
+ "properties": {
248
+ "attributeId": {
249
+ "$ref": "#/$defs/Ulid"
250
+ },
251
+ "slot": {
252
+ "$ref": "#/$defs/Slot"
253
+ }
254
+ }
255
+ },
256
+ "Response": {
257
+ "$anchor": "response",
258
+ "title": "Persona Profile Compose — response payload",
259
+ "description": "Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.",
260
+ "type": "object",
261
+ "additionalProperties": false,
262
+ "required": [
263
+ "profileId",
264
+ "scope",
265
+ "version"
266
+ ],
267
+ "properties": {
268
+ "profileId": {
269
+ "$ref": "#/$defs/Ulid"
270
+ },
271
+ "scope": {
272
+ "type": "string",
273
+ "enum": [
274
+ "local",
275
+ "pool"
276
+ ],
277
+ "description": "Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later."
278
+ },
279
+ "version": {
280
+ "$ref": "#/$defs/Version"
281
+ },
282
+ "pooled": {
283
+ "type": "array",
284
+ "maxItems": 64,
285
+ "description": "For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.",
286
+ "items": {
287
+ "type": "object",
288
+ "additionalProperties": false,
289
+ "required": [
290
+ "attributeId",
291
+ "created"
292
+ ],
293
+ "properties": {
294
+ "attributeId": {
295
+ "$ref": "#/$defs/Ulid"
296
+ },
297
+ "created": {
298
+ "type": "boolean"
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "binding": {
304
+ "type": "object",
305
+ "additionalProperties": false,
306
+ "required": [
307
+ "personaDid",
308
+ "version"
309
+ ],
310
+ "description": "Present when `personaDid` was given: the face is now worn there.",
311
+ "properties": {
312
+ "personaDid": {
313
+ "type": "string",
314
+ "minLength": 1
315
+ },
316
+ "version": {
317
+ "$ref": "#/$defs/Version"
318
+ },
319
+ "alsoBoundPersonaCount": {
320
+ "type": "integer",
321
+ "minimum": 0,
322
+ "description": "How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set."
323
+ }
324
+ }
325
+ },
326
+ "correlation": {
327
+ "type": "object",
328
+ "additionalProperties": false,
329
+ "required": [
330
+ "severity"
331
+ ],
332
+ "description": "Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.",
333
+ "properties": {
334
+ "severity": {
335
+ "type": "string",
336
+ "enum": [
337
+ "none",
338
+ "low",
339
+ "high"
340
+ ]
341
+ },
342
+ "sharedAttributeCount": {
343
+ "type": "integer",
344
+ "minimum": 0
345
+ }
346
+ }
347
+ },
348
+ "ext": {
349
+ "$ref": "#/$defs/Ext"
350
+ }
351
+ }
352
+ },
353
+ "Ext": {
354
+ "title": "Ext",
355
+ "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.",
356
+ "type": "object",
357
+ "minProperties": 1,
358
+ "additionalProperties": true,
359
+ "propertyNames": {
360
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
361
+ }
362
+ },
363
+ "Version": {
364
+ "title": "Version",
365
+ "description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
366
+ "type": "integer",
367
+ "minimum": 1
368
+ },
369
+ "Ulid": {
370
+ "title": "Ulid",
371
+ "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.",
372
+ "type": "string",
373
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
374
+ },
375
+ "Slot": {
376
+ "title": "Slot",
377
+ "type": "string",
378
+ "pattern": "^[a-z][A-Za-z0-9]{0,31}$",
379
+ "description": "A role a profile entry plays within its profile, so a consumer can find it without guessing from its claim type. A profile MAY hold several entries of one type — a legal name and a display name, two phone numbers — and only a slot says which answers a given question. Unique within a profile.\n\nWell-known slots:\n\n- `displayName` — what this face calls itself. The entry a consumer renders as the face's name to anyone it is shown to. Distinct from the profile's own `name`, which is the holder's private label and never disclosed.\n- `primaryEmail`, `primaryPhone`, `primaryAddress` — the entry to use where a counterparty asks for one of a kind and the profile holds several.\n- `avatar` — the image this face presents.\n\nOther values are the holder's or the producer's own and carry no meaning a maintainer interprets."
380
+ },
381
+ "ValueType": {
382
+ "title": "ValueType",
383
+ "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.",
384
+ "type": "string",
385
+ "enum": [
386
+ "string",
387
+ "number",
388
+ "boolean",
389
+ "date",
390
+ "object"
391
+ ]
392
+ },
393
+ "ClaimType": {
394
+ "title": "ClaimType",
395
+ "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.",
396
+ "type": "string",
397
+ "minLength": 1,
398
+ "maxLength": 128,
399
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
400
+ }
401
+ }
402
+ } as const;
403
+
404
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
405
+ export const RESPONSE_PAYLOAD_SCHEMA = {
406
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
407
+ "$ref": "#/$defs/Response",
408
+ "$defs": {
409
+ "ComposeClaim": {
410
+ "title": "ComposeClaim",
411
+ "description": "One claim of the face being composed: a value typed now, or an attribute the holder already keeps.",
412
+ "oneOf": [
413
+ {
414
+ "$ref": "#/$defs/NewClaim"
415
+ },
416
+ {
417
+ "$ref": "#/$defs/HeldClaim"
418
+ }
419
+ ]
420
+ },
421
+ "NewClaim": {
422
+ "title": "NewClaim",
423
+ "description": "A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.",
424
+ "type": "object",
425
+ "additionalProperties": false,
426
+ "required": [
427
+ "type",
428
+ "valueType",
429
+ "value"
430
+ ],
431
+ "properties": {
432
+ "type": {
433
+ "$ref": "#/$defs/ClaimType"
434
+ },
435
+ "valueType": {
436
+ "$ref": "#/$defs/ValueType"
437
+ },
438
+ "value": {},
439
+ "label": {
440
+ "type": "string",
441
+ "maxLength": 128,
442
+ "description": "The holder's note to self for this value. Never disclosed."
443
+ },
444
+ "slot": {
445
+ "$ref": "#/$defs/Slot"
446
+ },
447
+ "share": {
448
+ "type": "string",
449
+ "enum": [
450
+ "local",
451
+ "pool"
452
+ ],
453
+ "default": "local",
454
+ "description": "`local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists."
455
+ }
456
+ }
457
+ },
458
+ "HeldClaim": {
459
+ "title": "HeldClaim",
460
+ "description": "An attribute already in the holder's pool, presented live.",
461
+ "type": "object",
462
+ "additionalProperties": false,
463
+ "required": [
464
+ "attributeId"
465
+ ],
466
+ "properties": {
467
+ "attributeId": {
468
+ "$ref": "#/$defs/Ulid"
469
+ },
470
+ "slot": {
471
+ "$ref": "#/$defs/Slot"
472
+ }
473
+ }
474
+ },
475
+ "Response": {
476
+ "$anchor": "response",
477
+ "title": "Persona Profile Compose — response payload",
478
+ "description": "Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.",
479
+ "type": "object",
480
+ "additionalProperties": false,
481
+ "required": [
482
+ "profileId",
483
+ "scope",
484
+ "version"
485
+ ],
486
+ "properties": {
487
+ "profileId": {
488
+ "$ref": "#/$defs/Ulid"
489
+ },
490
+ "scope": {
491
+ "type": "string",
492
+ "enum": [
493
+ "local",
494
+ "pool"
495
+ ],
496
+ "description": "Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later."
497
+ },
498
+ "version": {
499
+ "$ref": "#/$defs/Version"
500
+ },
501
+ "pooled": {
502
+ "type": "array",
503
+ "maxItems": 64,
504
+ "description": "For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.",
505
+ "items": {
506
+ "type": "object",
507
+ "additionalProperties": false,
508
+ "required": [
509
+ "attributeId",
510
+ "created"
511
+ ],
512
+ "properties": {
513
+ "attributeId": {
514
+ "$ref": "#/$defs/Ulid"
515
+ },
516
+ "created": {
517
+ "type": "boolean"
518
+ }
519
+ }
520
+ }
521
+ },
522
+ "binding": {
523
+ "type": "object",
524
+ "additionalProperties": false,
525
+ "required": [
526
+ "personaDid",
527
+ "version"
528
+ ],
529
+ "description": "Present when `personaDid` was given: the face is now worn there.",
530
+ "properties": {
531
+ "personaDid": {
532
+ "type": "string",
533
+ "minLength": 1
534
+ },
535
+ "version": {
536
+ "$ref": "#/$defs/Version"
537
+ },
538
+ "alsoBoundPersonaCount": {
539
+ "type": "integer",
540
+ "minimum": 0,
541
+ "description": "How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set."
542
+ }
543
+ }
544
+ },
545
+ "correlation": {
546
+ "type": "object",
547
+ "additionalProperties": false,
548
+ "required": [
549
+ "severity"
550
+ ],
551
+ "description": "Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.",
552
+ "properties": {
553
+ "severity": {
554
+ "type": "string",
555
+ "enum": [
556
+ "none",
557
+ "low",
558
+ "high"
559
+ ]
560
+ },
561
+ "sharedAttributeCount": {
562
+ "type": "integer",
563
+ "minimum": 0
564
+ }
565
+ }
566
+ },
567
+ "ext": {
568
+ "$ref": "#/$defs/Ext"
569
+ }
570
+ }
571
+ },
572
+ "Ext": {
573
+ "title": "Ext",
574
+ "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.",
575
+ "type": "object",
576
+ "minProperties": 1,
577
+ "additionalProperties": true,
578
+ "propertyNames": {
579
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
580
+ }
581
+ },
582
+ "Version": {
583
+ "title": "Version",
584
+ "description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
585
+ "type": "integer",
586
+ "minimum": 1
587
+ },
588
+ "Ulid": {
589
+ "title": "Ulid",
590
+ "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.",
591
+ "type": "string",
592
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
593
+ },
594
+ "Slot": {
595
+ "title": "Slot",
596
+ "type": "string",
597
+ "pattern": "^[a-z][A-Za-z0-9]{0,31}$",
598
+ "description": "A role a profile entry plays within its profile, so a consumer can find it without guessing from its claim type. A profile MAY hold several entries of one type — a legal name and a display name, two phone numbers — and only a slot says which answers a given question. Unique within a profile.\n\nWell-known slots:\n\n- `displayName` — what this face calls itself. The entry a consumer renders as the face's name to anyone it is shown to. Distinct from the profile's own `name`, which is the holder's private label and never disclosed.\n- `primaryEmail`, `primaryPhone`, `primaryAddress` — the entry to use where a counterparty asks for one of a kind and the profile holds several.\n- `avatar` — the image this face presents.\n\nOther values are the holder's or the producer's own and carry no meaning a maintainer interprets."
599
+ },
600
+ "ValueType": {
601
+ "title": "ValueType",
602
+ "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.",
603
+ "type": "string",
604
+ "enum": [
605
+ "string",
606
+ "number",
607
+ "boolean",
608
+ "date",
609
+ "object"
610
+ ]
611
+ },
612
+ "ClaimType": {
613
+ "title": "ClaimType",
614
+ "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.",
615
+ "type": "string",
616
+ "minLength": 1,
617
+ "maxLength": 128,
618
+ "pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
619
+ }
620
+ }
621
+ } as const;
622
+
623
+ /**
624
+ * SPEC.md §7.2 policy for the request variant, from this specification's
625
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
626
+ * per-specification and cannot be derived from the document alone, and
627
+ * item 2 needs the schema this carries.
628
+ */
629
+ export const SPEC = {
630
+ typeUri: TYPE_URI,
631
+ isBearer: false,
632
+ isProofRequired: true,
633
+ isRecipientRequired: true,
634
+ isIssuedAtRequired: true,
635
+ payloadSchema: PAYLOAD_SCHEMA,
636
+ } as const;
637
+
638
+ /**
639
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
640
+ * tracks the *issuer* party's requirement because a response swaps the
641
+ * parties (§7.3 item 5).
642
+ */
643
+ export const RESPONSE_SPEC = {
644
+ typeUri: RESPONSE_TYPE_URI,
645
+ isBearer: false,
646
+ isProofRequired: true,
647
+ isRecipientRequired: true,
648
+ isIssuedAtRequired: true,
649
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
650
+ } as const;