@openvtc/trust-tasks 0.21.14 → 0.21.16

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 (32) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/index.d.ts +5 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +5 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/vta/attestation/mnemonic-status/0.1/payload.d.ts +281 -0
  7. package/dist/vta/attestation/mnemonic-status/0.1/payload.d.ts.map +1 -0
  8. package/dist/vta/attestation/mnemonic-status/0.1/payload.js +157 -0
  9. package/dist/vta/attestation/mnemonic-status/0.1/payload.js.map +1 -0
  10. package/dist/vta/metrics/show/0.1/payload.d.ts +674 -0
  11. package/dist/vta/metrics/show/0.1/payload.d.ts.map +1 -0
  12. package/dist/vta/metrics/show/0.1/payload.js +387 -0
  13. package/dist/vta/metrics/show/0.1/payload.js.map +1 -0
  14. package/dist/vtc/relationships/revoke/0.2/payload.d.ts +287 -0
  15. package/dist/vtc/relationships/revoke/0.2/payload.d.ts.map +1 -0
  16. package/dist/vtc/relationships/revoke/0.2/payload.js +159 -0
  17. package/dist/vtc/relationships/revoke/0.2/payload.js.map +1 -0
  18. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts +1385 -0
  19. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts.map +1 -0
  20. package/dist/vtc/vetting/hidden/publish/0.1/payload.js +735 -0
  21. package/dist/vtc/vetting/hidden/publish/0.1/payload.js.map +1 -0
  22. package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts +254 -0
  23. package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts.map +1 -0
  24. package/dist/vtc/vetting/vetters/resend/0.2/payload.js +142 -0
  25. package/dist/vtc/vetting/vetters/resend/0.2/payload.js.map +1 -0
  26. package/package.json +1 -1
  27. package/src/index.ts +5 -0
  28. package/src/vta/attestation/mnemonic-status/0.1/payload.ts +203 -0
  29. package/src/vta/metrics/show/0.1/payload.ts +418 -0
  30. package/src/vtc/relationships/revoke/0.2/payload.ts +209 -0
  31. package/src/vtc/vetting/hidden/publish/0.1/payload.ts +905 -0
  32. package/src/vtc/vetting/vetters/resend/0.2/payload.ts +183 -0
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/attestation/mnemonic-status/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An empty request. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTAAttestationMnemonicStatusPayload {
13
+ ext?: Ext;
14
+ }
15
+ /**
16
+ * The mnemonic export guard's current state. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/attestation/mnemonic-status/0.1#response.
17
+ */
18
+ export interface VTAAttestationMnemonicStatusResponsePayload {
19
+ /**
20
+ * Whether the export window is currently open.
21
+ */
22
+ windowActive: boolean;
23
+ /**
24
+ * Whether the mnemonic has already been exported. Once true, no further export succeeds — the release is one-time.
25
+ */
26
+ alreadyExported: boolean;
27
+ /**
28
+ * Whether the guard still holds entropy. False on every boot after the first, since a VTA generates its seed only once.
29
+ */
30
+ entropyAvailable: boolean;
31
+ /**
32
+ * Seconds remaining in the export window; 0 once it has expired or was never active.
33
+ */
34
+ windowRemainingSecs: number;
35
+ ext?: Ext;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { Ext };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/attestation/mnemonic-status/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VTAAttestationMnemonicStatusPayload;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/attestation/mnemonic-status/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VTAAttestationMnemonicStatusResponsePayload;
52
+
53
+ /**
54
+ * This specification's payload schema, as a value.
55
+ *
56
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
57
+ * rather than only as a `.json` file because TypeScript types are erased
58
+ * at runtime: without a schema a consumer has nothing to validate, and
59
+ * every REQUIRED payload member is optional in practice. Cross-file
60
+ * `$ref`s are already inlined, so it needs no resolver.
61
+ */
62
+ export const PAYLOAD_SCHEMA = {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "$id": "https://trusttasks.org/spec/vta/attestation/mnemonic-status/0.1",
65
+ "title": "VTA Attestation — Mnemonic Status — payload",
66
+ "description": "An empty request. The outer document members are owned by the framework — SPEC §6.3.",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "ext": {
71
+ "$ref": "#/$defs/Ext"
72
+ }
73
+ },
74
+ "$defs": {
75
+ "Response": {
76
+ "$anchor": "response",
77
+ "title": "VTA Attestation — Mnemonic Status — response payload",
78
+ "description": "The mnemonic export guard's current state. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/attestation/mnemonic-status/0.1#response.",
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "windowActive",
83
+ "alreadyExported",
84
+ "entropyAvailable",
85
+ "windowRemainingSecs"
86
+ ],
87
+ "properties": {
88
+ "windowActive": {
89
+ "type": "boolean",
90
+ "description": "Whether the export window is currently open."
91
+ },
92
+ "alreadyExported": {
93
+ "type": "boolean",
94
+ "description": "Whether the mnemonic has already been exported. Once true, no further export succeeds — the release is one-time."
95
+ },
96
+ "entropyAvailable": {
97
+ "type": "boolean",
98
+ "description": "Whether the guard still holds entropy. False on every boot after the first, since a VTA generates its seed only once."
99
+ },
100
+ "windowRemainingSecs": {
101
+ "type": "integer",
102
+ "minimum": 0,
103
+ "description": "Seconds remaining in the export window; 0 once it has expired or was never active."
104
+ },
105
+ "ext": {
106
+ "$ref": "#/$defs/Ext"
107
+ }
108
+ }
109
+ },
110
+ "Ext": {
111
+ "title": "Ext",
112
+ "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.",
113
+ "type": "object",
114
+ "minProperties": 1,
115
+ "additionalProperties": true,
116
+ "propertyNames": {
117
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
118
+ }
119
+ }
120
+ }
121
+ } as const;
122
+
123
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
124
+ export const RESPONSE_PAYLOAD_SCHEMA = {
125
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
126
+ "$ref": "#/$defs/Response",
127
+ "$defs": {
128
+ "Response": {
129
+ "$anchor": "response",
130
+ "title": "VTA Attestation — Mnemonic Status — response payload",
131
+ "description": "The mnemonic export guard's current state. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/attestation/mnemonic-status/0.1#response.",
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "required": [
135
+ "windowActive",
136
+ "alreadyExported",
137
+ "entropyAvailable",
138
+ "windowRemainingSecs"
139
+ ],
140
+ "properties": {
141
+ "windowActive": {
142
+ "type": "boolean",
143
+ "description": "Whether the export window is currently open."
144
+ },
145
+ "alreadyExported": {
146
+ "type": "boolean",
147
+ "description": "Whether the mnemonic has already been exported. Once true, no further export succeeds — the release is one-time."
148
+ },
149
+ "entropyAvailable": {
150
+ "type": "boolean",
151
+ "description": "Whether the guard still holds entropy. False on every boot after the first, since a VTA generates its seed only once."
152
+ },
153
+ "windowRemainingSecs": {
154
+ "type": "integer",
155
+ "minimum": 0,
156
+ "description": "Seconds remaining in the export window; 0 once it has expired or was never active."
157
+ },
158
+ "ext": {
159
+ "$ref": "#/$defs/Ext"
160
+ }
161
+ }
162
+ },
163
+ "Ext": {
164
+ "title": "Ext",
165
+ "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.",
166
+ "type": "object",
167
+ "minProperties": 1,
168
+ "additionalProperties": true,
169
+ "propertyNames": {
170
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
171
+ }
172
+ }
173
+ }
174
+ } as const;
175
+
176
+ /**
177
+ * SPEC.md §7.2 policy for the request variant, from this specification's
178
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
179
+ * per-specification and cannot be derived from the document alone, and
180
+ * item 2 needs the schema this carries.
181
+ */
182
+ export const SPEC = {
183
+ typeUri: TYPE_URI,
184
+ isBearer: false,
185
+ isProofRequired: true,
186
+ isRecipientRequired: true,
187
+ isIssuedAtRequired: false,
188
+ payloadSchema: PAYLOAD_SCHEMA,
189
+ } as const;
190
+
191
+ /**
192
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
193
+ * tracks the *issuer* party's requirement because a response swaps the
194
+ * parties (§7.3 item 5).
195
+ */
196
+ export const RESPONSE_SPEC = {
197
+ typeUri: RESPONSE_TYPE_URI,
198
+ isBearer: false,
199
+ isProofRequired: true,
200
+ isRecipientRequired: true,
201
+ isIssuedAtRequired: false,
202
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
203
+ } as const;
@@ -0,0 +1,418 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/metrics/show/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, Histogram, HistogramBucket, Metric, MetricsSnapshot } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An empty request; the whole snapshot is always returned. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTAMetricsShowPayload {
13
+ ext?: Ext;
14
+ }
15
+ /**
16
+ * The VTA's current metrics snapshot. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/metrics/show/0.1#response.
17
+ */
18
+ export interface VTAMetricsShowResponsePayload {
19
+ snapshot: MetricsSnapshot;
20
+ ext?: Ext;
21
+ }
22
+
23
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
24
+ export type { Ext, Histogram, HistogramBucket, Metric, MetricsSnapshot };
25
+
26
+ /** Trust Task type URI. */
27
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/metrics/show/0.1" as const;
28
+
29
+ /** Stable alias for this specification's request payload shape. */
30
+ export type Payload = VTAMetricsShowPayload;
31
+
32
+ /** Trust Task response type URI (request type URI + "#response"). */
33
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/metrics/show/0.1#response" as const;
34
+
35
+ /** Stable alias for this specification's success-response payload shape. */
36
+ export type Response = VTAMetricsShowResponsePayload;
37
+
38
+ /**
39
+ * This specification's payload schema, as a value.
40
+ *
41
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
42
+ * rather than only as a `.json` file because TypeScript types are erased
43
+ * at runtime: without a schema a consumer has nothing to validate, and
44
+ * every REQUIRED payload member is optional in practice. Cross-file
45
+ * `$ref`s are already inlined, so it needs no resolver.
46
+ */
47
+ export const PAYLOAD_SCHEMA = {
48
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
49
+ "$id": "https://trusttasks.org/spec/vta/metrics/show/0.1",
50
+ "title": "VTA Metrics — Show — payload",
51
+ "description": "An empty request; the whole snapshot is always returned. The outer document members are owned by the framework — SPEC §6.3.",
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "ext": {
56
+ "$ref": "#/$defs/Ext"
57
+ }
58
+ },
59
+ "$defs": {
60
+ "Response": {
61
+ "$anchor": "response",
62
+ "title": "VTA Metrics — Show — response payload",
63
+ "description": "The VTA's current metrics snapshot. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/metrics/show/0.1#response.",
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": [
67
+ "snapshot"
68
+ ],
69
+ "properties": {
70
+ "snapshot": {
71
+ "$ref": "#/$defs/MetricsSnapshot"
72
+ },
73
+ "ext": {
74
+ "$ref": "#/$defs/Ext"
75
+ }
76
+ }
77
+ },
78
+ "Ext": {
79
+ "title": "Ext",
80
+ "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.",
81
+ "type": "object",
82
+ "minProperties": 1,
83
+ "additionalProperties": true,
84
+ "propertyNames": {
85
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
86
+ }
87
+ },
88
+ "MetricsSnapshot": {
89
+ "title": "MetricsSnapshot",
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": [
93
+ "takenAt",
94
+ "counters",
95
+ "gauges",
96
+ "histograms"
97
+ ],
98
+ "properties": {
99
+ "takenAt": {
100
+ "type": "string",
101
+ "format": "date-time",
102
+ "description": "When the service read these values from its own instrumentation. Not the same as the envelope's issuedAt when a snapshot is cached briefly before answering."
103
+ },
104
+ "counters": {
105
+ "type": "array",
106
+ "items": {
107
+ "$ref": "#/$defs/Metric"
108
+ },
109
+ "description": "Monotonically increasing totals (e.g. requests served, errors raised). Empty when the service exposes none. Always present, so a collector can tell \"no counters\" from \"the field was dropped\"."
110
+ },
111
+ "gauges": {
112
+ "type": "array",
113
+ "items": {
114
+ "$ref": "#/$defs/Metric"
115
+ },
116
+ "description": "Point-in-time values that can rise or fall (e.g. open connections, queue depth). Empty when the service exposes none. Always present, for the same reason as counters."
117
+ },
118
+ "histograms": {
119
+ "type": "array",
120
+ "items": {
121
+ "$ref": "#/$defs/Histogram"
122
+ },
123
+ "description": "Distributions of observed values (e.g. request latency). Empty when the service exposes none. Always present, for the same reason as counters."
124
+ },
125
+ "ext": {
126
+ "$ref": "#/$defs/Ext"
127
+ }
128
+ }
129
+ },
130
+ "Histogram": {
131
+ "title": "Histogram",
132
+ "description": "One histogram's distribution, in the Prometheus cumulative-bucket convention: each bucket's `count` includes every observation at or below its `le`.",
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": [
136
+ "name",
137
+ "count",
138
+ "sum",
139
+ "buckets"
140
+ ],
141
+ "properties": {
142
+ "name": {
143
+ "type": "string",
144
+ "minLength": 1,
145
+ "description": "The histogram's stable name (e.g. `did_hosting_resolve_seconds`)."
146
+ },
147
+ "labels": {
148
+ "type": "object",
149
+ "additionalProperties": {
150
+ "type": "string"
151
+ },
152
+ "description": "Dimensions the distribution is broken down by. Absent or empty when the histogram carries none."
153
+ },
154
+ "count": {
155
+ "type": "integer",
156
+ "minimum": 0,
157
+ "description": "Total number of observations."
158
+ },
159
+ "sum": {
160
+ "type": "number",
161
+ "description": "Sum of all observed values."
162
+ },
163
+ "buckets": {
164
+ "type": "array",
165
+ "items": {
166
+ "$ref": "#/$defs/HistogramBucket"
167
+ },
168
+ "description": "Cumulative buckets, ordered by ascending `le`. Empty when the service exposes no bucket breakdown for this histogram — count and sum still apply. Always present, for the same reason as the snapshot's own arrays."
169
+ }
170
+ }
171
+ },
172
+ "HistogramBucket": {
173
+ "title": "HistogramBucket",
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "le",
178
+ "count"
179
+ ],
180
+ "properties": {
181
+ "le": {
182
+ "type": "number",
183
+ "description": "Upper bound of this bucket, inclusive. The final bucket conventionally reports the same value as the histogram's own `count` at whatever `le` the service treats as its ceiling."
184
+ },
185
+ "count": {
186
+ "type": "integer",
187
+ "minimum": 0,
188
+ "description": "Number of observations at or below `le`."
189
+ }
190
+ }
191
+ },
192
+ "Metric": {
193
+ "title": "Metric",
194
+ "description": "One counter or gauge reading.",
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "required": [
198
+ "name",
199
+ "value"
200
+ ],
201
+ "properties": {
202
+ "name": {
203
+ "type": "string",
204
+ "minLength": 1,
205
+ "description": "The metric's stable name (e.g. `did_hosting_requests_total`). Implementation-defined; the framework imposes no vocabulary."
206
+ },
207
+ "value": {
208
+ "type": "number",
209
+ "description": "The current reading."
210
+ },
211
+ "labels": {
212
+ "type": "object",
213
+ "additionalProperties": {
214
+ "type": "string"
215
+ },
216
+ "description": "Dimensions the value is broken down by (e.g. `{\"method\": \"resolve\"}`). Absent or empty when the metric carries none."
217
+ }
218
+ }
219
+ }
220
+ }
221
+ } as const;
222
+
223
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
224
+ export const RESPONSE_PAYLOAD_SCHEMA = {
225
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
226
+ "$ref": "#/$defs/Response",
227
+ "$defs": {
228
+ "Response": {
229
+ "$anchor": "response",
230
+ "title": "VTA Metrics — Show — response payload",
231
+ "description": "The VTA's current metrics snapshot. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/metrics/show/0.1#response.",
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": [
235
+ "snapshot"
236
+ ],
237
+ "properties": {
238
+ "snapshot": {
239
+ "$ref": "#/$defs/MetricsSnapshot"
240
+ },
241
+ "ext": {
242
+ "$ref": "#/$defs/Ext"
243
+ }
244
+ }
245
+ },
246
+ "Ext": {
247
+ "title": "Ext",
248
+ "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.",
249
+ "type": "object",
250
+ "minProperties": 1,
251
+ "additionalProperties": true,
252
+ "propertyNames": {
253
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
254
+ }
255
+ },
256
+ "MetricsSnapshot": {
257
+ "title": "MetricsSnapshot",
258
+ "type": "object",
259
+ "additionalProperties": false,
260
+ "required": [
261
+ "takenAt",
262
+ "counters",
263
+ "gauges",
264
+ "histograms"
265
+ ],
266
+ "properties": {
267
+ "takenAt": {
268
+ "type": "string",
269
+ "format": "date-time",
270
+ "description": "When the service read these values from its own instrumentation. Not the same as the envelope's issuedAt when a snapshot is cached briefly before answering."
271
+ },
272
+ "counters": {
273
+ "type": "array",
274
+ "items": {
275
+ "$ref": "#/$defs/Metric"
276
+ },
277
+ "description": "Monotonically increasing totals (e.g. requests served, errors raised). Empty when the service exposes none. Always present, so a collector can tell \"no counters\" from \"the field was dropped\"."
278
+ },
279
+ "gauges": {
280
+ "type": "array",
281
+ "items": {
282
+ "$ref": "#/$defs/Metric"
283
+ },
284
+ "description": "Point-in-time values that can rise or fall (e.g. open connections, queue depth). Empty when the service exposes none. Always present, for the same reason as counters."
285
+ },
286
+ "histograms": {
287
+ "type": "array",
288
+ "items": {
289
+ "$ref": "#/$defs/Histogram"
290
+ },
291
+ "description": "Distributions of observed values (e.g. request latency). Empty when the service exposes none. Always present, for the same reason as counters."
292
+ },
293
+ "ext": {
294
+ "$ref": "#/$defs/Ext"
295
+ }
296
+ }
297
+ },
298
+ "Histogram": {
299
+ "title": "Histogram",
300
+ "description": "One histogram's distribution, in the Prometheus cumulative-bucket convention: each bucket's `count` includes every observation at or below its `le`.",
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": [
304
+ "name",
305
+ "count",
306
+ "sum",
307
+ "buckets"
308
+ ],
309
+ "properties": {
310
+ "name": {
311
+ "type": "string",
312
+ "minLength": 1,
313
+ "description": "The histogram's stable name (e.g. `did_hosting_resolve_seconds`)."
314
+ },
315
+ "labels": {
316
+ "type": "object",
317
+ "additionalProperties": {
318
+ "type": "string"
319
+ },
320
+ "description": "Dimensions the distribution is broken down by. Absent or empty when the histogram carries none."
321
+ },
322
+ "count": {
323
+ "type": "integer",
324
+ "minimum": 0,
325
+ "description": "Total number of observations."
326
+ },
327
+ "sum": {
328
+ "type": "number",
329
+ "description": "Sum of all observed values."
330
+ },
331
+ "buckets": {
332
+ "type": "array",
333
+ "items": {
334
+ "$ref": "#/$defs/HistogramBucket"
335
+ },
336
+ "description": "Cumulative buckets, ordered by ascending `le`. Empty when the service exposes no bucket breakdown for this histogram — count and sum still apply. Always present, for the same reason as the snapshot's own arrays."
337
+ }
338
+ }
339
+ },
340
+ "HistogramBucket": {
341
+ "title": "HistogramBucket",
342
+ "type": "object",
343
+ "additionalProperties": false,
344
+ "required": [
345
+ "le",
346
+ "count"
347
+ ],
348
+ "properties": {
349
+ "le": {
350
+ "type": "number",
351
+ "description": "Upper bound of this bucket, inclusive. The final bucket conventionally reports the same value as the histogram's own `count` at whatever `le` the service treats as its ceiling."
352
+ },
353
+ "count": {
354
+ "type": "integer",
355
+ "minimum": 0,
356
+ "description": "Number of observations at or below `le`."
357
+ }
358
+ }
359
+ },
360
+ "Metric": {
361
+ "title": "Metric",
362
+ "description": "One counter or gauge reading.",
363
+ "type": "object",
364
+ "additionalProperties": false,
365
+ "required": [
366
+ "name",
367
+ "value"
368
+ ],
369
+ "properties": {
370
+ "name": {
371
+ "type": "string",
372
+ "minLength": 1,
373
+ "description": "The metric's stable name (e.g. `did_hosting_requests_total`). Implementation-defined; the framework imposes no vocabulary."
374
+ },
375
+ "value": {
376
+ "type": "number",
377
+ "description": "The current reading."
378
+ },
379
+ "labels": {
380
+ "type": "object",
381
+ "additionalProperties": {
382
+ "type": "string"
383
+ },
384
+ "description": "Dimensions the value is broken down by (e.g. `{\"method\": \"resolve\"}`). Absent or empty when the metric carries none."
385
+ }
386
+ }
387
+ }
388
+ }
389
+ } as const;
390
+
391
+ /**
392
+ * SPEC.md §7.2 policy for the request variant, from this specification's
393
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
394
+ * per-specification and cannot be derived from the document alone, and
395
+ * item 2 needs the schema this carries.
396
+ */
397
+ export const SPEC = {
398
+ typeUri: TYPE_URI,
399
+ isBearer: false,
400
+ isProofRequired: true,
401
+ isRecipientRequired: true,
402
+ isIssuedAtRequired: false,
403
+ payloadSchema: PAYLOAD_SCHEMA,
404
+ } as const;
405
+
406
+ /**
407
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
408
+ * tracks the *issuer* party's requirement because a response swaps the
409
+ * parties (§7.3 item 5).
410
+ */
411
+ export const RESPONSE_SPEC = {
412
+ typeUri: RESPONSE_TYPE_URI,
413
+ isBearer: false,
414
+ isProofRequired: true,
415
+ isRecipientRequired: true,
416
+ isIssuedAtRequired: false,
417
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
418
+ } as const;