@openvtc/trust-tasks 0.21.13 → 0.21.14

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 (60) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/_shared/components.d.ts +91 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/_shared/0.3/session.d.ts +16 -0
  5. package/dist/auth/_shared/0.3/session.d.ts.map +1 -0
  6. package/dist/auth/_shared/0.3/session.js +6 -0
  7. package/dist/auth/_shared/0.3/session.js.map +1 -0
  8. package/dist/auth/authenticate/0.3/payload.d.ts +852 -0
  9. package/dist/auth/authenticate/0.3/payload.d.ts.map +1 -0
  10. package/dist/auth/authenticate/0.3/payload.js +442 -0
  11. package/dist/auth/authenticate/0.3/payload.js.map +1 -0
  12. package/dist/auth/refresh/0.2/payload.d.ts +729 -0
  13. package/dist/auth/refresh/0.2/payload.d.ts.map +1 -0
  14. package/dist/auth/refresh/0.2/payload.js +392 -0
  15. package/dist/auth/refresh/0.2/payload.js.map +1 -0
  16. package/dist/git-ns/_shared/0.5/git-ns.d.ts +16 -0
  17. package/dist/git-ns/_shared/0.5/git-ns.d.ts.map +1 -0
  18. package/dist/git-ns/_shared/0.5/git-ns.js +6 -0
  19. package/dist/git-ns/_shared/0.5/git-ns.js.map +1 -0
  20. package/dist/git-ns/account/list/0.1/payload.d.ts +598 -0
  21. package/dist/git-ns/account/list/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/account/list/0.1/payload.js +317 -0
  23. package/dist/git-ns/account/list/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/activity/list/0.1/payload.d.ts +642 -0
  25. package/dist/git-ns/activity/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/activity/list/0.1/payload.js +343 -0
  27. package/dist/git-ns/activity/list/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts +697 -0
  29. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/bridge/job/list/0.1/payload.js +386 -0
  31. package/dist/git-ns/bridge/job/list/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/projection/show/0.1/payload.d.ts +705 -0
  33. package/dist/git-ns/projection/show/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/projection/show/0.1/payload.js +377 -0
  35. package/dist/git-ns/projection/show/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts +862 -0
  37. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/right/issued-by-departed/0.1/payload.js +487 -0
  39. package/dist/git-ns/right/issued-by-departed/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/right/list/0.1/payload.d.ts +773 -0
  41. package/dist/git-ns/right/list/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/right/list/0.1/payload.js +439 -0
  43. package/dist/git-ns/right/list/0.1/payload.js.map +1 -0
  44. package/dist/index.d.ts +10 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +10 -0
  47. package/dist/index.js.map +1 -1
  48. package/package.json +1 -1
  49. package/src/_shared/components.ts +91 -0
  50. package/src/auth/_shared/0.3/session.ts +17 -0
  51. package/src/auth/authenticate/0.3/payload.ts +527 -0
  52. package/src/auth/refresh/0.2/payload.ts +444 -0
  53. package/src/git-ns/_shared/0.5/git-ns.ts +17 -0
  54. package/src/git-ns/account/list/0.1/payload.ts +392 -0
  55. package/src/git-ns/activity/list/0.1/payload.ts +430 -0
  56. package/src/git-ns/bridge/job/list/0.1/payload.ts +490 -0
  57. package/src/git-ns/projection/show/0.1/payload.ts +479 -0
  58. package/src/git-ns/right/issued-by-departed/0.1/payload.ts +550 -0
  59. package/src/git-ns/right/list/0.1/payload.ts +493 -0
  60. package/src/index.ts +10 -0
@@ -0,0 +1,729 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/refresh/0.2/payload.schema.json
4
+ */
5
+ import type { Ext, Session_AuthV0_3 as Session, TokenBundle } from "../../../_shared/components.js";
6
+ /**
7
+ * Exchange a refresh token for a new access token (and optionally a new refresh token). 0.2 adds no new payload member: it accepts an optional framework `proof` made by a session key bound to the session at auth/authenticate/0.2 or 0.3, presented alongside — never instead of — the refresh token, and it never advances a session's `expiresAt` past its `absoluteExpiresAt`. See Conformance and Security & Privacy.
8
+ */
9
+ export interface AuthRefresh {
10
+ /**
11
+ * The refresh token previously issued in a TokenBundle. Consumers verify it server-side; producers treat it as opaque.
12
+ */
13
+ refreshToken: string;
14
+ /**
15
+ * Optional capability tags requested on the new access token. MAY be narrower than the original session's scope; consumers MUST NOT widen scope on refresh.
16
+ */
17
+ scope?: string[];
18
+ /**
19
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
20
+ */
21
+ ext?: Ext;
22
+ }
23
+ /**
24
+ * Issued by the auth service when the presented refresh token is valid. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/refresh/0.2#response.
25
+ */
26
+ export interface AuthRefreshResponsePayload {
27
+ /**
28
+ * Optional session snapshot. Consumers SHOULD include it so the producer can refresh client-side state (acr changes after step-up, scope changes after policy edits, and the session's `absoluteExpiresAt`) without a separate whoami call.
29
+ */
30
+ session?: Session;
31
+ /**
32
+ * New access token. If the consumer's policy rotates refresh tokens on each use, a new refreshToken is included; otherwise the producer continues using the previously-issued one.
33
+ */
34
+ tokens: TokenBundle;
35
+ /**
36
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
37
+ */
38
+ ext?: Ext;
39
+ }
40
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
41
+ export type { Ext, Session, TokenBundle };
42
+ /** Trust Task type URI. */
43
+ export declare const TYPE_URI: "https://trusttasks.org/spec/auth/refresh/0.2";
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = AuthRefresh;
46
+ /** Trust Task response type URI (request type URI + "#response"). */
47
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/auth/refresh/0.2#response";
48
+ /** Stable alias for this specification's success-response payload shape. */
49
+ export type Response = AuthRefreshResponsePayload;
50
+ /**
51
+ * This specification's payload schema, as a value.
52
+ *
53
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
54
+ * rather than only as a `.json` file because TypeScript types are erased
55
+ * at runtime: without a schema a consumer has nothing to validate, and
56
+ * every REQUIRED payload member is optional in practice. Cross-file
57
+ * `$ref`s are already inlined, so it needs no resolver.
58
+ */
59
+ export declare const PAYLOAD_SCHEMA: {
60
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
61
+ readonly $id: "https://trusttasks.org/spec/auth/refresh/0.2";
62
+ readonly title: "Auth — Refresh";
63
+ readonly description: "Exchange a refresh token for a new access token (and optionally a new refresh token). 0.2 adds no new payload member: it accepts an optional framework `proof` made by a session key bound to the session at auth/authenticate/0.2 or 0.3, presented alongside — never instead of — the refresh token, and it never advances a session's `expiresAt` past its `absoluteExpiresAt`. See Conformance and Security & Privacy.";
64
+ readonly type: "object";
65
+ readonly additionalProperties: false;
66
+ readonly required: readonly ["refreshToken"];
67
+ readonly properties: {
68
+ readonly refreshToken: {
69
+ readonly type: "string";
70
+ readonly minLength: 1;
71
+ readonly description: "The refresh token previously issued in a TokenBundle. Consumers verify it server-side; producers treat it as opaque.";
72
+ };
73
+ readonly scope: {
74
+ readonly type: "array";
75
+ readonly items: {
76
+ readonly type: "string";
77
+ readonly minLength: 1;
78
+ };
79
+ readonly description: "Optional capability tags requested on the new access token. MAY be narrower than the original session's scope; consumers MUST NOT widen scope on refresh.";
80
+ };
81
+ readonly ext: {
82
+ readonly $ref: "#/$defs/Ext";
83
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
84
+ };
85
+ };
86
+ readonly $defs: {
87
+ readonly Response: {
88
+ readonly $anchor: "response";
89
+ readonly title: "Auth Refresh — response payload";
90
+ readonly description: "Issued by the auth service when the presented refresh token is valid. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/refresh/0.2#response.";
91
+ readonly type: "object";
92
+ readonly additionalProperties: false;
93
+ readonly required: readonly ["tokens"];
94
+ readonly properties: {
95
+ readonly session: {
96
+ readonly $ref: "#/$defs/Session";
97
+ readonly description: "Optional session snapshot. Consumers SHOULD include it so the producer can refresh client-side state (acr changes after step-up, scope changes after policy edits, and the session's `absoluteExpiresAt`) without a separate whoami call.";
98
+ };
99
+ readonly tokens: {
100
+ readonly $ref: "#/$defs/TokenBundle";
101
+ readonly description: "New access token. If the consumer's policy rotates refresh tokens on each use, a new refreshToken is included; otherwise the producer continues using the previously-issued one.";
102
+ };
103
+ readonly ext: {
104
+ readonly $ref: "#/$defs/Ext";
105
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
106
+ };
107
+ };
108
+ };
109
+ readonly Ext: {
110
+ readonly title: "Ext";
111
+ readonly 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.";
112
+ readonly type: "object";
113
+ readonly minProperties: 1;
114
+ readonly additionalProperties: true;
115
+ readonly propertyNames: {
116
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
117
+ };
118
+ };
119
+ readonly TokenBundle: {
120
+ readonly $anchor: "tokenBundle";
121
+ readonly title: "TokenBundle";
122
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
123
+ readonly type: "object";
124
+ readonly additionalProperties: false;
125
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
126
+ readonly properties: {
127
+ readonly accessToken: {
128
+ readonly type: "string";
129
+ readonly minLength: 1;
130
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
131
+ };
132
+ readonly refreshToken: {
133
+ readonly type: "string";
134
+ readonly minLength: 1;
135
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
136
+ };
137
+ readonly tokenType: {
138
+ readonly type: "string";
139
+ readonly minLength: 1;
140
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
141
+ };
142
+ readonly expiresIn: {
143
+ readonly type: "integer";
144
+ readonly minimum: 1;
145
+ readonly description: "Seconds from issuance until the access token expires.";
146
+ };
147
+ readonly refreshExpiresIn: {
148
+ readonly type: "integer";
149
+ readonly minimum: 1;
150
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
151
+ };
152
+ readonly scope: {
153
+ readonly type: "array";
154
+ readonly items: {
155
+ readonly type: "string";
156
+ readonly minLength: 1;
157
+ };
158
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
159
+ };
160
+ readonly ext: {
161
+ readonly $ref: "#/$defs/Ext";
162
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
163
+ };
164
+ };
165
+ };
166
+ readonly Session: {
167
+ readonly $anchor: "session";
168
+ readonly title: "Session";
169
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
170
+ readonly type: "object";
171
+ readonly additionalProperties: false;
172
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
173
+ readonly properties: {
174
+ readonly id: {
175
+ readonly type: "string";
176
+ readonly minLength: 1;
177
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
178
+ };
179
+ readonly subject: {
180
+ readonly type: "string";
181
+ readonly minLength: 1;
182
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
183
+ };
184
+ readonly issuedAt: {
185
+ readonly type: "string";
186
+ readonly format: "date-time";
187
+ readonly description: "ISO-8601 timestamp when the session was created.";
188
+ };
189
+ readonly expiresAt: {
190
+ readonly type: "string";
191
+ readonly format: "date-time";
192
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
193
+ };
194
+ readonly amr: {
195
+ readonly type: "array";
196
+ readonly minItems: 1;
197
+ readonly items: {
198
+ readonly type: "string";
199
+ readonly minLength: 1;
200
+ };
201
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
202
+ };
203
+ readonly acr: {
204
+ readonly type: "string";
205
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
206
+ };
207
+ readonly sessionKey: {
208
+ readonly type: "string";
209
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
210
+ readonly maxLength: 512;
211
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
212
+ };
213
+ readonly actor: {
214
+ readonly type: "string";
215
+ readonly minLength: 1;
216
+ readonly maxLength: 2048;
217
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
218
+ };
219
+ readonly absoluteExpiresAt: {
220
+ readonly type: "string";
221
+ readonly format: "date-time";
222
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
223
+ };
224
+ readonly ext: {
225
+ readonly $ref: "#/$defs/Ext";
226
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
227
+ };
228
+ };
229
+ };
230
+ };
231
+ };
232
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
233
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
234
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
235
+ readonly $ref: "#/$defs/Response";
236
+ readonly $defs: {
237
+ readonly Response: {
238
+ readonly $anchor: "response";
239
+ readonly title: "Auth Refresh — response payload";
240
+ readonly description: "Issued by the auth service when the presented refresh token is valid. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/refresh/0.2#response.";
241
+ readonly type: "object";
242
+ readonly additionalProperties: false;
243
+ readonly required: readonly ["tokens"];
244
+ readonly properties: {
245
+ readonly session: {
246
+ readonly $ref: "#/$defs/Session";
247
+ readonly description: "Optional session snapshot. Consumers SHOULD include it so the producer can refresh client-side state (acr changes after step-up, scope changes after policy edits, and the session's `absoluteExpiresAt`) without a separate whoami call.";
248
+ };
249
+ readonly tokens: {
250
+ readonly $ref: "#/$defs/TokenBundle";
251
+ readonly description: "New access token. If the consumer's policy rotates refresh tokens on each use, a new refreshToken is included; otherwise the producer continues using the previously-issued one.";
252
+ };
253
+ readonly ext: {
254
+ readonly $ref: "#/$defs/Ext";
255
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
256
+ };
257
+ };
258
+ };
259
+ readonly Ext: {
260
+ readonly title: "Ext";
261
+ readonly 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.";
262
+ readonly type: "object";
263
+ readonly minProperties: 1;
264
+ readonly additionalProperties: true;
265
+ readonly propertyNames: {
266
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
267
+ };
268
+ };
269
+ readonly TokenBundle: {
270
+ readonly $anchor: "tokenBundle";
271
+ readonly title: "TokenBundle";
272
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
273
+ readonly type: "object";
274
+ readonly additionalProperties: false;
275
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
276
+ readonly properties: {
277
+ readonly accessToken: {
278
+ readonly type: "string";
279
+ readonly minLength: 1;
280
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
281
+ };
282
+ readonly refreshToken: {
283
+ readonly type: "string";
284
+ readonly minLength: 1;
285
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
286
+ };
287
+ readonly tokenType: {
288
+ readonly type: "string";
289
+ readonly minLength: 1;
290
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
291
+ };
292
+ readonly expiresIn: {
293
+ readonly type: "integer";
294
+ readonly minimum: 1;
295
+ readonly description: "Seconds from issuance until the access token expires.";
296
+ };
297
+ readonly refreshExpiresIn: {
298
+ readonly type: "integer";
299
+ readonly minimum: 1;
300
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
301
+ };
302
+ readonly scope: {
303
+ readonly type: "array";
304
+ readonly items: {
305
+ readonly type: "string";
306
+ readonly minLength: 1;
307
+ };
308
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
309
+ };
310
+ readonly ext: {
311
+ readonly $ref: "#/$defs/Ext";
312
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
313
+ };
314
+ };
315
+ };
316
+ readonly Session: {
317
+ readonly $anchor: "session";
318
+ readonly title: "Session";
319
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
320
+ readonly type: "object";
321
+ readonly additionalProperties: false;
322
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
323
+ readonly properties: {
324
+ readonly id: {
325
+ readonly type: "string";
326
+ readonly minLength: 1;
327
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
328
+ };
329
+ readonly subject: {
330
+ readonly type: "string";
331
+ readonly minLength: 1;
332
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
333
+ };
334
+ readonly issuedAt: {
335
+ readonly type: "string";
336
+ readonly format: "date-time";
337
+ readonly description: "ISO-8601 timestamp when the session was created.";
338
+ };
339
+ readonly expiresAt: {
340
+ readonly type: "string";
341
+ readonly format: "date-time";
342
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
343
+ };
344
+ readonly amr: {
345
+ readonly type: "array";
346
+ readonly minItems: 1;
347
+ readonly items: {
348
+ readonly type: "string";
349
+ readonly minLength: 1;
350
+ };
351
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
352
+ };
353
+ readonly acr: {
354
+ readonly type: "string";
355
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
356
+ };
357
+ readonly sessionKey: {
358
+ readonly type: "string";
359
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
360
+ readonly maxLength: 512;
361
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
362
+ };
363
+ readonly actor: {
364
+ readonly type: "string";
365
+ readonly minLength: 1;
366
+ readonly maxLength: 2048;
367
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
368
+ };
369
+ readonly absoluteExpiresAt: {
370
+ readonly type: "string";
371
+ readonly format: "date-time";
372
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
373
+ };
374
+ readonly ext: {
375
+ readonly $ref: "#/$defs/Ext";
376
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
377
+ };
378
+ };
379
+ };
380
+ };
381
+ };
382
+ /**
383
+ * SPEC.md §7.2 policy for the request variant, from this specification's
384
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
385
+ * per-specification and cannot be derived from the document alone, and
386
+ * item 2 needs the schema this carries.
387
+ */
388
+ export declare const SPEC: {
389
+ readonly typeUri: "https://trusttasks.org/spec/auth/refresh/0.2";
390
+ readonly isBearer: false;
391
+ readonly isProofRequired: false;
392
+ readonly isRecipientRequired: true;
393
+ readonly isIssuedAtRequired: true;
394
+ readonly payloadSchema: {
395
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
396
+ readonly $id: "https://trusttasks.org/spec/auth/refresh/0.2";
397
+ readonly title: "Auth — Refresh";
398
+ readonly description: "Exchange a refresh token for a new access token (and optionally a new refresh token). 0.2 adds no new payload member: it accepts an optional framework `proof` made by a session key bound to the session at auth/authenticate/0.2 or 0.3, presented alongside — never instead of — the refresh token, and it never advances a session's `expiresAt` past its `absoluteExpiresAt`. See Conformance and Security & Privacy.";
399
+ readonly type: "object";
400
+ readonly additionalProperties: false;
401
+ readonly required: readonly ["refreshToken"];
402
+ readonly properties: {
403
+ readonly refreshToken: {
404
+ readonly type: "string";
405
+ readonly minLength: 1;
406
+ readonly description: "The refresh token previously issued in a TokenBundle. Consumers verify it server-side; producers treat it as opaque.";
407
+ };
408
+ readonly scope: {
409
+ readonly type: "array";
410
+ readonly items: {
411
+ readonly type: "string";
412
+ readonly minLength: 1;
413
+ };
414
+ readonly description: "Optional capability tags requested on the new access token. MAY be narrower than the original session's scope; consumers MUST NOT widen scope on refresh.";
415
+ };
416
+ readonly ext: {
417
+ readonly $ref: "#/$defs/Ext";
418
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
419
+ };
420
+ };
421
+ readonly $defs: {
422
+ readonly Response: {
423
+ readonly $anchor: "response";
424
+ readonly title: "Auth Refresh — response payload";
425
+ readonly description: "Issued by the auth service when the presented refresh token is valid. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/refresh/0.2#response.";
426
+ readonly type: "object";
427
+ readonly additionalProperties: false;
428
+ readonly required: readonly ["tokens"];
429
+ readonly properties: {
430
+ readonly session: {
431
+ readonly $ref: "#/$defs/Session";
432
+ readonly description: "Optional session snapshot. Consumers SHOULD include it so the producer can refresh client-side state (acr changes after step-up, scope changes after policy edits, and the session's `absoluteExpiresAt`) without a separate whoami call.";
433
+ };
434
+ readonly tokens: {
435
+ readonly $ref: "#/$defs/TokenBundle";
436
+ readonly description: "New access token. If the consumer's policy rotates refresh tokens on each use, a new refreshToken is included; otherwise the producer continues using the previously-issued one.";
437
+ };
438
+ readonly ext: {
439
+ readonly $ref: "#/$defs/Ext";
440
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
441
+ };
442
+ };
443
+ };
444
+ readonly Ext: {
445
+ readonly title: "Ext";
446
+ readonly 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.";
447
+ readonly type: "object";
448
+ readonly minProperties: 1;
449
+ readonly additionalProperties: true;
450
+ readonly propertyNames: {
451
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
452
+ };
453
+ };
454
+ readonly TokenBundle: {
455
+ readonly $anchor: "tokenBundle";
456
+ readonly title: "TokenBundle";
457
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
458
+ readonly type: "object";
459
+ readonly additionalProperties: false;
460
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
461
+ readonly properties: {
462
+ readonly accessToken: {
463
+ readonly type: "string";
464
+ readonly minLength: 1;
465
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
466
+ };
467
+ readonly refreshToken: {
468
+ readonly type: "string";
469
+ readonly minLength: 1;
470
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
471
+ };
472
+ readonly tokenType: {
473
+ readonly type: "string";
474
+ readonly minLength: 1;
475
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
476
+ };
477
+ readonly expiresIn: {
478
+ readonly type: "integer";
479
+ readonly minimum: 1;
480
+ readonly description: "Seconds from issuance until the access token expires.";
481
+ };
482
+ readonly refreshExpiresIn: {
483
+ readonly type: "integer";
484
+ readonly minimum: 1;
485
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
486
+ };
487
+ readonly scope: {
488
+ readonly type: "array";
489
+ readonly items: {
490
+ readonly type: "string";
491
+ readonly minLength: 1;
492
+ };
493
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
494
+ };
495
+ readonly ext: {
496
+ readonly $ref: "#/$defs/Ext";
497
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
498
+ };
499
+ };
500
+ };
501
+ readonly Session: {
502
+ readonly $anchor: "session";
503
+ readonly title: "Session";
504
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
505
+ readonly type: "object";
506
+ readonly additionalProperties: false;
507
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
508
+ readonly properties: {
509
+ readonly id: {
510
+ readonly type: "string";
511
+ readonly minLength: 1;
512
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
513
+ };
514
+ readonly subject: {
515
+ readonly type: "string";
516
+ readonly minLength: 1;
517
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
518
+ };
519
+ readonly issuedAt: {
520
+ readonly type: "string";
521
+ readonly format: "date-time";
522
+ readonly description: "ISO-8601 timestamp when the session was created.";
523
+ };
524
+ readonly expiresAt: {
525
+ readonly type: "string";
526
+ readonly format: "date-time";
527
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
528
+ };
529
+ readonly amr: {
530
+ readonly type: "array";
531
+ readonly minItems: 1;
532
+ readonly items: {
533
+ readonly type: "string";
534
+ readonly minLength: 1;
535
+ };
536
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
537
+ };
538
+ readonly acr: {
539
+ readonly type: "string";
540
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
541
+ };
542
+ readonly sessionKey: {
543
+ readonly type: "string";
544
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
545
+ readonly maxLength: 512;
546
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
547
+ };
548
+ readonly actor: {
549
+ readonly type: "string";
550
+ readonly minLength: 1;
551
+ readonly maxLength: 2048;
552
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
553
+ };
554
+ readonly absoluteExpiresAt: {
555
+ readonly type: "string";
556
+ readonly format: "date-time";
557
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
558
+ };
559
+ readonly ext: {
560
+ readonly $ref: "#/$defs/Ext";
561
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
562
+ };
563
+ };
564
+ };
565
+ };
566
+ };
567
+ };
568
+ /**
569
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
570
+ * tracks the *issuer* party's requirement because a response swaps the
571
+ * parties (§7.3 item 5).
572
+ */
573
+ export declare const RESPONSE_SPEC: {
574
+ readonly typeUri: "https://trusttasks.org/spec/auth/refresh/0.2#response";
575
+ readonly isBearer: false;
576
+ readonly isProofRequired: false;
577
+ readonly isRecipientRequired: true;
578
+ readonly isIssuedAtRequired: true;
579
+ readonly payloadSchema: {
580
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
581
+ readonly $ref: "#/$defs/Response";
582
+ readonly $defs: {
583
+ readonly Response: {
584
+ readonly $anchor: "response";
585
+ readonly title: "Auth Refresh — response payload";
586
+ readonly description: "Issued by the auth service when the presented refresh token is valid. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/refresh/0.2#response.";
587
+ readonly type: "object";
588
+ readonly additionalProperties: false;
589
+ readonly required: readonly ["tokens"];
590
+ readonly properties: {
591
+ readonly session: {
592
+ readonly $ref: "#/$defs/Session";
593
+ readonly description: "Optional session snapshot. Consumers SHOULD include it so the producer can refresh client-side state (acr changes after step-up, scope changes after policy edits, and the session's `absoluteExpiresAt`) without a separate whoami call.";
594
+ };
595
+ readonly tokens: {
596
+ readonly $ref: "#/$defs/TokenBundle";
597
+ readonly description: "New access token. If the consumer's policy rotates refresh tokens on each use, a new refreshToken is included; otherwise the producer continues using the previously-issued one.";
598
+ };
599
+ readonly ext: {
600
+ readonly $ref: "#/$defs/Ext";
601
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
602
+ };
603
+ };
604
+ };
605
+ readonly Ext: {
606
+ readonly title: "Ext";
607
+ readonly 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.";
608
+ readonly type: "object";
609
+ readonly minProperties: 1;
610
+ readonly additionalProperties: true;
611
+ readonly propertyNames: {
612
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
613
+ };
614
+ };
615
+ readonly TokenBundle: {
616
+ readonly $anchor: "tokenBundle";
617
+ readonly title: "TokenBundle";
618
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
619
+ readonly type: "object";
620
+ readonly additionalProperties: false;
621
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
622
+ readonly properties: {
623
+ readonly accessToken: {
624
+ readonly type: "string";
625
+ readonly minLength: 1;
626
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
627
+ };
628
+ readonly refreshToken: {
629
+ readonly type: "string";
630
+ readonly minLength: 1;
631
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
632
+ };
633
+ readonly tokenType: {
634
+ readonly type: "string";
635
+ readonly minLength: 1;
636
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
637
+ };
638
+ readonly expiresIn: {
639
+ readonly type: "integer";
640
+ readonly minimum: 1;
641
+ readonly description: "Seconds from issuance until the access token expires.";
642
+ };
643
+ readonly refreshExpiresIn: {
644
+ readonly type: "integer";
645
+ readonly minimum: 1;
646
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
647
+ };
648
+ readonly scope: {
649
+ readonly type: "array";
650
+ readonly items: {
651
+ readonly type: "string";
652
+ readonly minLength: 1;
653
+ };
654
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
655
+ };
656
+ readonly ext: {
657
+ readonly $ref: "#/$defs/Ext";
658
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
659
+ };
660
+ };
661
+ };
662
+ readonly Session: {
663
+ readonly $anchor: "session";
664
+ readonly title: "Session";
665
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
666
+ readonly type: "object";
667
+ readonly additionalProperties: false;
668
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
669
+ readonly properties: {
670
+ readonly id: {
671
+ readonly type: "string";
672
+ readonly minLength: 1;
673
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
674
+ };
675
+ readonly subject: {
676
+ readonly type: "string";
677
+ readonly minLength: 1;
678
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
679
+ };
680
+ readonly issuedAt: {
681
+ readonly type: "string";
682
+ readonly format: "date-time";
683
+ readonly description: "ISO-8601 timestamp when the session was created.";
684
+ };
685
+ readonly expiresAt: {
686
+ readonly type: "string";
687
+ readonly format: "date-time";
688
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
689
+ };
690
+ readonly amr: {
691
+ readonly type: "array";
692
+ readonly minItems: 1;
693
+ readonly items: {
694
+ readonly type: "string";
695
+ readonly minLength: 1;
696
+ };
697
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
698
+ };
699
+ readonly acr: {
700
+ readonly type: "string";
701
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
702
+ };
703
+ readonly sessionKey: {
704
+ readonly type: "string";
705
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
706
+ readonly maxLength: 512;
707
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
708
+ };
709
+ readonly actor: {
710
+ readonly type: "string";
711
+ readonly minLength: 1;
712
+ readonly maxLength: 2048;
713
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
714
+ };
715
+ readonly absoluteExpiresAt: {
716
+ readonly type: "string";
717
+ readonly format: "date-time";
718
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
719
+ };
720
+ readonly ext: {
721
+ readonly $ref: "#/$defs/Ext";
722
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
723
+ };
724
+ };
725
+ };
726
+ };
727
+ };
728
+ };
729
+ //# sourceMappingURL=payload.d.ts.map