@openvtc/trust-tasks 0.21.9 → 0.21.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.
- package/CHANGELOG.md +82 -0
- package/dist/_shared/components.d.ts +40 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/_shared/0.1/session.d.ts +1 -1
- package/dist/auth/_shared/0.1/session.d.ts.map +1 -1
- package/dist/auth/_shared/0.2/session.d.ts +16 -0
- package/dist/auth/_shared/0.2/session.d.ts.map +1 -0
- package/dist/auth/_shared/0.2/session.js +6 -0
- package/dist/auth/_shared/0.2/session.js.map +1 -0
- package/dist/auth/authenticate/0.1/payload.d.ts +1 -1
- package/dist/auth/authenticate/0.1/payload.d.ts.map +1 -1
- package/dist/auth/authenticate/0.2/payload.d.ts +715 -0
- package/dist/auth/authenticate/0.2/payload.d.ts.map +1 -0
- package/dist/auth/authenticate/0.2/payload.js +384 -0
- package/dist/auth/authenticate/0.2/payload.js.map +1 -0
- package/dist/auth/passkey/login/finish/0.1/payload.d.ts +1 -1
- package/dist/auth/passkey/login/finish/0.1/payload.d.ts.map +1 -1
- package/dist/auth/passkey/login/finish/0.2/payload.d.ts +1 -1
- package/dist/auth/passkey/login/finish/0.2/payload.d.ts.map +1 -1
- package/dist/auth/refresh/0.1/payload.d.ts +1 -1
- package/dist/auth/refresh/0.1/payload.d.ts.map +1 -1
- package/dist/auth/sessions/list/0.1/payload.d.ts +1 -1
- package/dist/auth/sessions/list/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.2/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.2/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.3/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.3/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts.map +1 -1
- package/dist/auth/whoami/0.1/payload.d.ts +1 -1
- package/dist/auth/whoami/0.1/payload.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/trust-task-discovery/0.3/payload.d.ts +483 -0
- package/dist/trust-task-discovery/0.3/payload.d.ts.map +1 -0
- package/dist/trust-task-discovery/0.3/payload.js +242 -0
- package/dist/trust-task-discovery/0.3/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +40 -1
- package/src/auth/_shared/0.1/session.ts +1 -1
- package/src/auth/_shared/0.2/session.ts +17 -0
- package/src/auth/authenticate/0.1/payload.ts +1 -1
- package/src/auth/authenticate/0.2/payload.ts +444 -0
- package/src/auth/passkey/login/finish/0.1/payload.ts +1 -1
- package/src/auth/passkey/login/finish/0.2/payload.ts +1 -1
- package/src/auth/refresh/0.1/payload.ts +1 -1
- package/src/auth/sessions/list/0.1/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.1/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.2/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.3/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.4/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.5/payload.ts +1 -1
- package/src/auth/whoami/0.1/payload.ts +1 -1
- package/src/index.ts +3 -0
- package/src/trust-task-discovery/0.3/payload.ts +357 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/trust-task-discovery/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.
|
|
8
|
+
*/
|
|
9
|
+
export interface TrustTaskDiscoveryPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally.
|
|
12
|
+
*
|
|
13
|
+
* @maxItems 16
|
|
14
|
+
*/
|
|
15
|
+
patterns?:
|
|
16
|
+
| []
|
|
17
|
+
| [string]
|
|
18
|
+
| [string, string]
|
|
19
|
+
| [string, string, string]
|
|
20
|
+
| [string, string, string, string]
|
|
21
|
+
| [string, string, string, string, string]
|
|
22
|
+
| [string, string, string, string, string, string]
|
|
23
|
+
| [string, string, string, string, string, string, string]
|
|
24
|
+
| [string, string, string, string, string, string, string, string]
|
|
25
|
+
| [string, string, string, string, string, string, string, string, string]
|
|
26
|
+
| [string, string, string, string, string, string, string, string, string, string]
|
|
27
|
+
| [string, string, string, string, string, string, string, string, string, string, string]
|
|
28
|
+
| [string, string, string, string, string, string, string, string, string, string, string, string]
|
|
29
|
+
| [string, string, string, string, string, string, string, string, string, string, string, string, string]
|
|
30
|
+
| [string, string, string, string, string, string, string, string, string, string, string, string, string, string]
|
|
31
|
+
| [
|
|
32
|
+
string,
|
|
33
|
+
string,
|
|
34
|
+
string,
|
|
35
|
+
string,
|
|
36
|
+
string,
|
|
37
|
+
string,
|
|
38
|
+
string,
|
|
39
|
+
string,
|
|
40
|
+
string,
|
|
41
|
+
string,
|
|
42
|
+
string,
|
|
43
|
+
string,
|
|
44
|
+
string,
|
|
45
|
+
string,
|
|
46
|
+
string
|
|
47
|
+
]
|
|
48
|
+
| [
|
|
49
|
+
string,
|
|
50
|
+
string,
|
|
51
|
+
string,
|
|
52
|
+
string,
|
|
53
|
+
string,
|
|
54
|
+
string,
|
|
55
|
+
string,
|
|
56
|
+
string,
|
|
57
|
+
string,
|
|
58
|
+
string,
|
|
59
|
+
string,
|
|
60
|
+
string,
|
|
61
|
+
string,
|
|
62
|
+
string,
|
|
63
|
+
string,
|
|
64
|
+
string
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.
|
|
69
|
+
*/
|
|
70
|
+
export interface TrustTaskDiscoveryResponsePayload {
|
|
71
|
+
/**
|
|
72
|
+
* Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form.
|
|
73
|
+
*/
|
|
74
|
+
supportedTypes: (
|
|
75
|
+
| string
|
|
76
|
+
| {
|
|
77
|
+
/**
|
|
78
|
+
* A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists.
|
|
79
|
+
*/
|
|
80
|
+
type: string;
|
|
81
|
+
/**
|
|
82
|
+
* Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies.
|
|
83
|
+
*
|
|
84
|
+
* @minItems 1
|
|
85
|
+
*/
|
|
86
|
+
requiredExt?: [string, ...string[]];
|
|
87
|
+
acceptanceWindow?: AcceptanceWindow;
|
|
88
|
+
}
|
|
89
|
+
)[];
|
|
90
|
+
/**
|
|
91
|
+
* MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH.
|
|
92
|
+
*/
|
|
93
|
+
frameworkVersion?: string;
|
|
94
|
+
acceptanceWindow?: AcceptanceWindow;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The freshness bounds a responder applies, as a consumer, to the `issuedAt` of a document it receives (SPEC.md §7.2 item 13). A responder refuses a document when now > issuedAt + maxAgeSeconds + clockSkewSeconds, and when issuedAt > now + clockSkewSeconds. It says nothing about `expiresAt`, which is honoured independently (SPEC.md §7.2 item 4). Both members are whole seconds.
|
|
98
|
+
*/
|
|
99
|
+
export interface AcceptanceWindow {
|
|
100
|
+
/**
|
|
101
|
+
* The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts the document, before any clock-skew tolerance is applied.
|
|
102
|
+
*/
|
|
103
|
+
maxAgeSeconds: number;
|
|
104
|
+
/**
|
|
105
|
+
* The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none.
|
|
106
|
+
*/
|
|
107
|
+
clockSkewSeconds: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Trust Task type URI. */
|
|
111
|
+
export const TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.3" as const;
|
|
112
|
+
|
|
113
|
+
/** Stable alias for this specification's request payload shape. */
|
|
114
|
+
export type Payload = TrustTaskDiscoveryPayload;
|
|
115
|
+
|
|
116
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
117
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.3#response" as const;
|
|
118
|
+
|
|
119
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
120
|
+
export type Response = TrustTaskDiscoveryResponsePayload;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* This specification's payload schema, as a value.
|
|
124
|
+
*
|
|
125
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
126
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
127
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
128
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
129
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
130
|
+
*/
|
|
131
|
+
export const PAYLOAD_SCHEMA = {
|
|
132
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
133
|
+
"$id": "https://trusttasks.org/spec/trust-task-discovery/0.3",
|
|
134
|
+
"title": "Trust Task Discovery — payload",
|
|
135
|
+
"description": "Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"properties": {
|
|
139
|
+
"patterns": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"maxItems": 16,
|
|
142
|
+
"items": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"description": "Slug-glob pattern. Matches: '*' (every slug); '<prefix>/*' (any slug starting with '<prefix>/' — e.g. 'acl/*' matches 'acl/grant', 'acl/revoke', 'acl/grant/sub'); otherwise an exact slug match. Wildcards anywhere other than as a trailing segment are not interpreted — the only sigils are the trailing '/*' and the bare '*'."
|
|
146
|
+
},
|
|
147
|
+
"description": "Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally."
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"$defs": {
|
|
151
|
+
"AcceptanceWindow": {
|
|
152
|
+
"title": "Acceptance window",
|
|
153
|
+
"description": "The freshness bounds a responder applies, as a consumer, to the `issuedAt` of a document it receives (SPEC.md §7.2 item 13). A responder refuses a document when now > issuedAt + maxAgeSeconds + clockSkewSeconds, and when issuedAt > now + clockSkewSeconds. It says nothing about `expiresAt`, which is honoured independently (SPEC.md §7.2 item 4). Both members are whole seconds.",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": [
|
|
157
|
+
"maxAgeSeconds",
|
|
158
|
+
"clockSkewSeconds"
|
|
159
|
+
],
|
|
160
|
+
"properties": {
|
|
161
|
+
"maxAgeSeconds": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"minimum": 1,
|
|
164
|
+
"description": "The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts the document, before any clock-skew tolerance is applied."
|
|
165
|
+
},
|
|
166
|
+
"clockSkewSeconds": {
|
|
167
|
+
"type": "integer",
|
|
168
|
+
"minimum": 0,
|
|
169
|
+
"description": "The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none."
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"Response": {
|
|
174
|
+
"$anchor": "response",
|
|
175
|
+
"title": "Trust Task Discovery — response payload",
|
|
176
|
+
"description": "List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.",
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"required": [
|
|
180
|
+
"supportedTypes"
|
|
181
|
+
],
|
|
182
|
+
"properties": {
|
|
183
|
+
"supportedTypes": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"oneOf": [
|
|
187
|
+
{
|
|
188
|
+
"type": "string",
|
|
189
|
+
"format": "uri",
|
|
190
|
+
"description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": [
|
|
196
|
+
"type"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"type": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"format": "uri",
|
|
202
|
+
"description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
|
|
203
|
+
},
|
|
204
|
+
"requiredExt": {
|
|
205
|
+
"type": "array",
|
|
206
|
+
"items": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
209
|
+
},
|
|
210
|
+
"minItems": 1,
|
|
211
|
+
"uniqueItems": true,
|
|
212
|
+
"description": "Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies."
|
|
213
|
+
},
|
|
214
|
+
"acceptanceWindow": {
|
|
215
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"description": "Object form: lists a Type URI together with optional capability annotations. An `acceptanceWindow` here is the window the responder applies to documents of this Type URI, and takes precedence over the response-level `acceptanceWindow` for this entry."
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`, `acceptanceWindow`)."
|
|
222
|
+
},
|
|
223
|
+
"description": "Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form."
|
|
224
|
+
},
|
|
225
|
+
"frameworkVersion": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
228
|
+
"description": "MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH."
|
|
229
|
+
},
|
|
230
|
+
"acceptanceWindow": {
|
|
231
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
} as const;
|
|
237
|
+
|
|
238
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
239
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
240
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
241
|
+
"$ref": "#/$defs/Response",
|
|
242
|
+
"$defs": {
|
|
243
|
+
"AcceptanceWindow": {
|
|
244
|
+
"title": "Acceptance window",
|
|
245
|
+
"description": "The freshness bounds a responder applies, as a consumer, to the `issuedAt` of a document it receives (SPEC.md §7.2 item 13). A responder refuses a document when now > issuedAt + maxAgeSeconds + clockSkewSeconds, and when issuedAt > now + clockSkewSeconds. It says nothing about `expiresAt`, which is honoured independently (SPEC.md §7.2 item 4). Both members are whole seconds.",
|
|
246
|
+
"type": "object",
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"required": [
|
|
249
|
+
"maxAgeSeconds",
|
|
250
|
+
"clockSkewSeconds"
|
|
251
|
+
],
|
|
252
|
+
"properties": {
|
|
253
|
+
"maxAgeSeconds": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"minimum": 1,
|
|
256
|
+
"description": "The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts the document, before any clock-skew tolerance is applied."
|
|
257
|
+
},
|
|
258
|
+
"clockSkewSeconds": {
|
|
259
|
+
"type": "integer",
|
|
260
|
+
"minimum": 0,
|
|
261
|
+
"description": "The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none."
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"Response": {
|
|
266
|
+
"$anchor": "response",
|
|
267
|
+
"title": "Trust Task Discovery — response payload",
|
|
268
|
+
"description": "List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.",
|
|
269
|
+
"type": "object",
|
|
270
|
+
"additionalProperties": false,
|
|
271
|
+
"required": [
|
|
272
|
+
"supportedTypes"
|
|
273
|
+
],
|
|
274
|
+
"properties": {
|
|
275
|
+
"supportedTypes": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"oneOf": [
|
|
279
|
+
{
|
|
280
|
+
"type": "string",
|
|
281
|
+
"format": "uri",
|
|
282
|
+
"description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": [
|
|
288
|
+
"type"
|
|
289
|
+
],
|
|
290
|
+
"properties": {
|
|
291
|
+
"type": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"format": "uri",
|
|
294
|
+
"description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
|
|
295
|
+
},
|
|
296
|
+
"requiredExt": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"items": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
301
|
+
},
|
|
302
|
+
"minItems": 1,
|
|
303
|
+
"uniqueItems": true,
|
|
304
|
+
"description": "Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies."
|
|
305
|
+
},
|
|
306
|
+
"acceptanceWindow": {
|
|
307
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"description": "Object form: lists a Type URI together with optional capability annotations. An `acceptanceWindow` here is the window the responder applies to documents of this Type URI, and takes precedence over the response-level `acceptanceWindow` for this entry."
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`, `acceptanceWindow`)."
|
|
314
|
+
},
|
|
315
|
+
"description": "Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form."
|
|
316
|
+
},
|
|
317
|
+
"frameworkVersion": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
320
|
+
"description": "MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH."
|
|
321
|
+
},
|
|
322
|
+
"acceptanceWindow": {
|
|
323
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
} as const;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
332
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
333
|
+
* per-specification and cannot be derived from the document alone, and
|
|
334
|
+
* item 2 needs the schema this carries.
|
|
335
|
+
*/
|
|
336
|
+
export const SPEC = {
|
|
337
|
+
typeUri: TYPE_URI,
|
|
338
|
+
isBearer: false,
|
|
339
|
+
isProofRequired: false,
|
|
340
|
+
isRecipientRequired: true,
|
|
341
|
+
isIssuedAtRequired: false,
|
|
342
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
343
|
+
} as const;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
347
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
348
|
+
* parties (§7.3 item 5).
|
|
349
|
+
*/
|
|
350
|
+
export const RESPONSE_SPEC = {
|
|
351
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
352
|
+
isBearer: false,
|
|
353
|
+
isProofRequired: false,
|
|
354
|
+
isRecipientRequired: true,
|
|
355
|
+
isIssuedAtRequired: false,
|
|
356
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
357
|
+
} as const;
|