@openvtc/trust-tasks 0.28.23 → 0.28.24

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 (100) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/_shared/components.d.ts +520 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +45 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +45 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/messaging/mux/_shared/0.1/mux.d.ts +16 -0
  9. package/dist/messaging/mux/_shared/0.1/mux.d.ts.map +1 -0
  10. package/dist/messaging/mux/_shared/0.1/mux.js +6 -0
  11. package/dist/messaging/mux/_shared/0.1/mux.js.map +1 -0
  12. package/dist/messaging/mux/attach/0.1/payload.d.ts +996 -0
  13. package/dist/messaging/mux/attach/0.1/payload.d.ts.map +1 -0
  14. package/dist/messaging/mux/attach/0.1/payload.js +594 -0
  15. package/dist/messaging/mux/attach/0.1/payload.js.map +1 -0
  16. package/dist/messaging/mux/detach/0.1/payload.d.ts +398 -0
  17. package/dist/messaging/mux/detach/0.1/payload.d.ts.map +1 -0
  18. package/dist/messaging/mux/detach/0.1/payload.js +215 -0
  19. package/dist/messaging/mux/detach/0.1/payload.js.map +1 -0
  20. package/dist/messaging/mux/event/0.1/payload.d.ts +513 -0
  21. package/dist/messaging/mux/event/0.1/payload.d.ts.map +1 -0
  22. package/dist/messaging/mux/event/0.1/payload.js +260 -0
  23. package/dist/messaging/mux/event/0.1/payload.js.map +1 -0
  24. package/dist/messaging/mux/grant/0.1/payload.d.ts +1008 -0
  25. package/dist/messaging/mux/grant/0.1/payload.d.ts.map +1 -0
  26. package/dist/messaging/mux/grant/0.1/payload.js +606 -0
  27. package/dist/messaging/mux/grant/0.1/payload.js.map +1 -0
  28. package/dist/messaging/mux/list/0.1/payload.d.ts +1241 -0
  29. package/dist/messaging/mux/list/0.1/payload.d.ts.map +1 -0
  30. package/dist/messaging/mux/list/0.1/payload.js +715 -0
  31. package/dist/messaging/mux/list/0.1/payload.js.map +1 -0
  32. package/dist/messaging/mux/notice/0.1/payload.d.ts +489 -0
  33. package/dist/messaging/mux/notice/0.1/payload.d.ts.map +1 -0
  34. package/dist/messaging/mux/notice/0.1/payload.js +249 -0
  35. package/dist/messaging/mux/notice/0.1/payload.js.map +1 -0
  36. package/dist/messaging/mux/revoke/0.1/payload.d.ts +585 -0
  37. package/dist/messaging/mux/revoke/0.1/payload.d.ts.map +1 -0
  38. package/dist/messaging/mux/revoke/0.1/payload.js +311 -0
  39. package/dist/messaging/mux/revoke/0.1/payload.js.map +1 -0
  40. package/dist/messaging/mux/revoke-all/0.1/payload.d.ts +682 -0
  41. package/dist/messaging/mux/revoke-all/0.1/payload.d.ts.map +1 -0
  42. package/dist/messaging/mux/revoke-all/0.1/payload.js +397 -0
  43. package/dist/messaging/mux/revoke-all/0.1/payload.js.map +1 -0
  44. package/dist/messaging/mux/update/0.1/payload.d.ts +995 -0
  45. package/dist/messaging/mux/update/0.1/payload.d.ts.map +1 -0
  46. package/dist/messaging/mux/update/0.1/payload.js +586 -0
  47. package/dist/messaging/mux/update/0.1/payload.js.map +1 -0
  48. package/dist/vta/_shared/0.1/memory-record.d.ts +22 -0
  49. package/dist/vta/_shared/0.1/memory-record.d.ts.map +1 -0
  50. package/dist/vta/_shared/0.1/memory-record.js +6 -0
  51. package/dist/vta/_shared/0.1/memory-record.js.map +1 -0
  52. package/dist/vta/memory/delete/0.1/payload.d.ts +13 -2
  53. package/dist/vta/memory/delete/0.1/payload.d.ts.map +1 -1
  54. package/dist/vta/memory/delete/0.1/payload.js +1 -1
  55. package/dist/vta/memory/delete/0.1/payload.js.map +1 -1
  56. package/dist/vta/memory/delete/0.2/payload.d.ts +415 -0
  57. package/dist/vta/memory/delete/0.2/payload.d.ts.map +1 -0
  58. package/dist/vta/memory/delete/0.2/payload.js +224 -0
  59. package/dist/vta/memory/delete/0.2/payload.js.map +1 -0
  60. package/dist/vta/memory/get/0.1/payload.d.ts +646 -0
  61. package/dist/vta/memory/get/0.1/payload.d.ts.map +1 -0
  62. package/dist/vta/memory/get/0.1/payload.js +349 -0
  63. package/dist/vta/memory/get/0.1/payload.js.map +1 -0
  64. package/dist/vta/memory/list/0.1/payload.d.ts +13 -2
  65. package/dist/vta/memory/list/0.1/payload.d.ts.map +1 -1
  66. package/dist/vta/memory/list/0.1/payload.js +1 -1
  67. package/dist/vta/memory/list/0.1/payload.js.map +1 -1
  68. package/dist/vta/memory/list/0.2/payload.d.ts +693 -0
  69. package/dist/vta/memory/list/0.2/payload.d.ts.map +1 -0
  70. package/dist/vta/memory/list/0.2/payload.js +363 -0
  71. package/dist/vta/memory/list/0.2/payload.js.map +1 -0
  72. package/dist/vta/memory/put/0.1/payload.d.ts +13 -2
  73. package/dist/vta/memory/put/0.1/payload.d.ts.map +1 -1
  74. package/dist/vta/memory/put/0.1/payload.js +1 -1
  75. package/dist/vta/memory/put/0.1/payload.js.map +1 -1
  76. package/dist/vta/memory/put/0.2/payload.d.ts +490 -0
  77. package/dist/vta/memory/put/0.2/payload.d.ts.map +1 -0
  78. package/dist/vta/memory/put/0.2/payload.js +264 -0
  79. package/dist/vta/memory/put/0.2/payload.js.map +1 -0
  80. package/package.json +1 -1
  81. package/src/_shared/components.ts +581 -0
  82. package/src/index.ts +45 -0
  83. package/src/messaging/mux/_shared/0.1/mux.ts +17 -0
  84. package/src/messaging/mux/attach/0.1/payload.ts +682 -0
  85. package/src/messaging/mux/detach/0.1/payload.ts +278 -0
  86. package/src/messaging/mux/event/0.1/payload.ts +371 -0
  87. package/src/messaging/mux/grant/0.1/payload.ts +710 -0
  88. package/src/messaging/mux/list/0.1/payload.ts +793 -0
  89. package/src/messaging/mux/notice/0.1/payload.ts +362 -0
  90. package/src/messaging/mux/revoke/0.1/payload.ts +389 -0
  91. package/src/messaging/mux/revoke-all/0.1/payload.ts +452 -0
  92. package/src/messaging/mux/update/0.1/payload.ts +644 -0
  93. package/src/vta/_shared/0.1/memory-record.ts +23 -0
  94. package/src/vta/memory/delete/0.1/payload.ts +14 -3
  95. package/src/vta/memory/delete/0.2/payload.ts +288 -0
  96. package/src/vta/memory/get/0.1/payload.ts +414 -0
  97. package/src/vta/memory/list/0.1/payload.ts +14 -3
  98. package/src/vta/memory/list/0.2/payload.ts +445 -0
  99. package/src/vta/memory/put/0.1/payload.ts +14 -3
  100. package/src/vta/memory/put/0.2/payload.ts +333 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/messaging/mux/update/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGzM;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,kBAAkB,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAEhK,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,sDAA+D,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,586 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/mux/update/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/messaging/mux/update/0.1";
7
+ /**
8
+ * The earlier version of this specification that this one declares it
9
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
10
+ * `null`. Only the direct declaration — follow the chain with
11
+ * `extendsChain` / `readForSpec`.
12
+ */
13
+ export const EXTENDS = null;
14
+ /**
15
+ * Why this version is deprecated, or `null` while it is current. A
16
+ * superseded or retired version is still supported, and is withdrawn from
17
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
18
+ * Versions").
19
+ */
20
+ export const DEPRECATION = null;
21
+ /** Trust Task response type URI (request type URI + "#response"). */
22
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/mux/update/0.1#response";
23
+ /**
24
+ * This specification's payload schema, as a value.
25
+ *
26
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
27
+ * rather than only as a `.json` file because TypeScript types are erased
28
+ * at runtime: without a schema a consumer has nothing to validate, and
29
+ * every REQUIRED payload member is optional in practice. Cross-file
30
+ * `$ref`s are already inlined, so it needs no resolver.
31
+ */
32
+ export const PAYLOAD_SCHEMA = {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "$id": "https://trusttasks.org/spec/messaging/mux/update/0.1",
35
+ "title": "Messaging — Mux Update — payload",
36
+ "description": "Narrow a stored grant — a smaller scope or an earlier expiry — without a new member signature. Anything that widens is refused. The outer document members are owned by the framework — SPEC §6.3.",
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": [
40
+ "grantId"
41
+ ],
42
+ "properties": {
43
+ "grantId": {
44
+ "$ref": "#/$defs/GrantId",
45
+ "description": "The grant to narrow."
46
+ },
47
+ "scope": {
48
+ "$ref": "#/$defs/MuxScope",
49
+ "description": "The new effective scope. MUST be a subset of the grant's current effective scope."
50
+ },
51
+ "expiresAt": {
52
+ "type": "string",
53
+ "format": "date-time",
54
+ "description": "The new effective expiry. MUST be in the future and no later than the grant's current effective expiry."
55
+ },
56
+ "ext": {
57
+ "$ref": "#/$defs/Ext",
58
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
59
+ }
60
+ },
61
+ "$defs": {
62
+ "Response": {
63
+ "$anchor": "response",
64
+ "title": "Messaging — Mux Update — response payload",
65
+ "description": "The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "grant",
70
+ "changed"
71
+ ],
72
+ "properties": {
73
+ "grant": {
74
+ "$ref": "#/$defs/GrantView",
75
+ "description": "The grant as it now stands."
76
+ },
77
+ "changed": {
78
+ "type": "boolean",
79
+ "description": "False when the request named the values already in force."
80
+ },
81
+ "ext": {
82
+ "$ref": "#/$defs/Ext",
83
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
84
+ }
85
+ }
86
+ },
87
+ "Ext": {
88
+ "title": "Ext",
89
+ "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.",
90
+ "type": "object",
91
+ "minProperties": 1,
92
+ "additionalProperties": true,
93
+ "propertyNames": {
94
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
95
+ }
96
+ },
97
+ "GrantView": {
98
+ "title": "GrantView",
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "statement",
103
+ "state",
104
+ "scope",
105
+ "expiresAt"
106
+ ],
107
+ "description": "The mediator's view of one stored grant, as messaging/mux/list and messaging/mux/update return it: the grant statement verbatim, with the state and the effective scope and expiry beside it.",
108
+ "properties": {
109
+ "statement": {
110
+ "$ref": "#/$defs/GrantStatement",
111
+ "description": "The grant statement exactly as the member signed it and the mediator stored it, proof included, so either party can re-verify it."
112
+ },
113
+ "state": {
114
+ "$ref": "#/$defs/GrantState"
115
+ },
116
+ "scope": {
117
+ "$ref": "#/$defs/MuxScope",
118
+ "description": "The effective scope: the signed scope, or the narrower one messaging/mux/update set."
119
+ },
120
+ "expiresAt": {
121
+ "type": "string",
122
+ "format": "date-time",
123
+ "description": "The effective expiry: the signed `exp` rendered as RFC 3339, or the earlier one messaging/mux/update set."
124
+ },
125
+ "narrowed": {
126
+ "type": "boolean",
127
+ "description": "True when messaging/mux/update narrowed the effective scope or expiry below what the statement signs."
128
+ },
129
+ "attachedNow": {
130
+ "type": "boolean",
131
+ "description": "Principal view only: whether the member is attached through this grant to the connection that carried the list request."
132
+ }
133
+ }
134
+ },
135
+ "MuxScope": {
136
+ "title": "MuxScope",
137
+ "type": "array",
138
+ "minItems": 1,
139
+ "maxItems": 16,
140
+ "items": {
141
+ "$ref": "#/$defs/MuxScopeValue"
142
+ },
143
+ "description": "A set of capabilities: a non-empty JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses into one. Never empty: an empty scope is refused, never read as \"all\". There is no default scope anywhere — every attach and every grant names its scope explicitly. A scope is always bounded by the member DID's own access-control capabilities at the mediator."
144
+ },
145
+ "MuxScopeValue": {
146
+ "title": "MuxScopeValue",
147
+ "type": "string",
148
+ "enum": [
149
+ "receive",
150
+ "pickup",
151
+ "delete",
152
+ "send"
153
+ ],
154
+ "description": "One capability a member DID extends to a principal's connection. `receive`: live delivery of the member's inbound messages on the connection. `pickup`: message-pickup status and delivery requests naming the member as `recipient_did`, and inclusion in a raw-TSP inbox drain. `delete`: deleting the member's stored messages, including delete-on-ack and delete-on-send; a member without `delete` keeps its messages in its inbox until something holding `delete` collects them. `send`: the mediator accepts on this connection frames whose sender is the member DID — the frame is still signed or authcrypted with the member's own keys; the scope only lets the mediator accept it on this socket."
155
+ },
156
+ "GrantState": {
157
+ "title": "GrantState",
158
+ "type": "string",
159
+ "enum": [
160
+ "active",
161
+ "suspended",
162
+ "staleKey",
163
+ "expired",
164
+ "epochRevoked"
165
+ ],
166
+ "description": "A stored grant's state. `active`: valid; the member is attached whenever the principal is connected. `suspended`: the member DID proved control with a key that signed none of its active grants (the unknown-key rule); terminal — the grant cannot be resumed and must be recreated by a fresh member signature. `staleKey`: the key that signed the grant is no longer in the member DID's current authentication relationship; terminal — it does not become active again if the key reappears. `expired`: an active grant past its effective expiry; computed when read, never stored. `epochRevoked`: the member DID advanced its epoch with messaging/mux/revoke-all. A grant revoked with messaging/mux/revoke has no state: it is deleted. A dead grant (every state but `active`) stays listable for the mediator's retention window after its effective expiry, then is pruned."
167
+ },
168
+ "GrantStatement": {
169
+ "title": "GrantStatement",
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "type",
174
+ "issuer",
175
+ "audience",
176
+ "grantId",
177
+ "principal",
178
+ "scope",
179
+ "epoch",
180
+ "iat",
181
+ "exp",
182
+ "proof"
183
+ ],
184
+ "description": "A member DID's standing statement that the named principal may carry its traffic at this mediator, on any connection, until `exp`, within `scope`, under the member's current `epoch`. Signed by the member with an embedded Data Integrity proof whose purpose is `authentication`, and stored verbatim by the mediator as the only evidence of the delegation.",
185
+ "properties": {
186
+ "type": {
187
+ "type": "string",
188
+ "const": "muxGrant",
189
+ "description": "Always `muxGrant`; names the statement kind, so a statement of one kind is never accepted as another."
190
+ },
191
+ "issuer": {
192
+ "$ref": "#/$defs/MuxDid",
193
+ "description": "The member DID: the signer, and the DID the statement concerns."
194
+ },
195
+ "audience": {
196
+ "$ref": "#/$defs/MuxDid",
197
+ "description": "The mediator's DID. A statement names exactly one mediator and is refused by every other."
198
+ },
199
+ "grantId": {
200
+ "$ref": "#/$defs/GrantId"
201
+ },
202
+ "principal": {
203
+ "$ref": "#/$defs/MuxDid",
204
+ "description": "The principal DID that may carry the member's traffic. MUST differ from `issuer`."
205
+ },
206
+ "scope": {
207
+ "$ref": "#/$defs/StatementScope"
208
+ },
209
+ "epoch": {
210
+ "type": "integer",
211
+ "minimum": 0,
212
+ "description": "The member DID's current epoch at the mediator. Only messaging/mux/revoke-all advances it."
213
+ },
214
+ "iat": {
215
+ "type": "integer",
216
+ "minimum": 0,
217
+ "description": "JWT NumericDate (RFC 7519 §2), whole seconds since 1970-01-01T00:00:00Z UTC: when the statement was signed. MUST NOT be more than 60 seconds in the mediator's future."
218
+ },
219
+ "exp": {
220
+ "type": "integer",
221
+ "minimum": 0,
222
+ "description": "JWT NumericDate (RFC 7519 §2): when the statement stops being accepted. REQUIRED; MUST be after `iat` and in the future."
223
+ },
224
+ "proof": {
225
+ "$ref": "#/$defs/MuxDataIntegrityProof"
226
+ }
227
+ }
228
+ },
229
+ "MuxDataIntegrityProof": {
230
+ "title": "MuxDataIntegrityProof",
231
+ "type": "object",
232
+ "additionalProperties": false,
233
+ "required": [
234
+ "type",
235
+ "cryptosuite",
236
+ "verificationMethod",
237
+ "proofPurpose",
238
+ "proofValue"
239
+ ],
240
+ "description": "The W3C Data Integrity proof embedded in a mux statement, made by the member DID: the format and verifier Trust Tasks already use for document proofs (SPEC §4.7). The proof covers the whole statement except `proof` itself, as the cryptosuite defines. Closed: a member Data Integrity defines but this list omits is refused.",
241
+ "properties": {
242
+ "type": {
243
+ "type": "string",
244
+ "const": "DataIntegrityProof"
245
+ },
246
+ "cryptosuite": {
247
+ "type": "string",
248
+ "enum": [
249
+ "eddsa-jcs-2022",
250
+ "eddsa-rdfc-2022"
251
+ ],
252
+ "description": "The W3C Data Integrity EdDSA cryptosuite used."
253
+ },
254
+ "verificationMethod": {
255
+ "type": "string",
256
+ "minLength": 5,
257
+ "maxLength": 2048,
258
+ "pattern": "^did:\\S+#\\S+$",
259
+ "description": "The DID URL of the verification method that signed. MUST be controlled by the statement's `issuer` and listed in that DID's current `authentication` relationship."
260
+ },
261
+ "proofPurpose": {
262
+ "type": "string",
263
+ "minLength": 1,
264
+ "maxLength": 64,
265
+ "description": "MUST be `authentication`. Any other value is refused with `messaging/mux:proofPurposeInvalid` — a proof made for another relationship (an `assertionMethod` credential signature, say) is never accepted as control of the DID."
266
+ },
267
+ "created": {
268
+ "type": "string",
269
+ "format": "date-time",
270
+ "description": "OPTIONAL: when the proof was made, as Data Integrity defines it. Covered by the proof; the statement's own `iat` is what the mediator checks."
271
+ },
272
+ "proofValue": {
273
+ "type": "string",
274
+ "minLength": 2,
275
+ "maxLength": 4096,
276
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
277
+ "description": "The multibase (base58btc) signature."
278
+ }
279
+ }
280
+ },
281
+ "StatementScope": {
282
+ "title": "StatementScope",
283
+ "type": "array",
284
+ "maxItems": 16,
285
+ "items": {
286
+ "$ref": "#/$defs/MuxScopeValue"
287
+ },
288
+ "description": "The scope a member DID signs into a statement: a JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses. It MUST NOT be empty; an empty signed scope is refused with the task's `emptyScope` code, never read as \"all\". Unlike MuxScope, emptiness is not a schema failure here, so that the refusal is reported per statement rather than failing the whole batch."
289
+ },
290
+ "MuxDid": {
291
+ "title": "MuxDid",
292
+ "type": "string",
293
+ "minLength": 7,
294
+ "maxLength": 2048,
295
+ "pattern": "^did:[a-z0-9]+:\\S+$",
296
+ "description": "A DID, carried verbatim and compared by exact string equality. Unlike the messaging family's `Vid`, never a hash: the mediator resolves it to verify a statement signed by it. For a member DID reached over TSP, the TSP VID is the DID itself."
297
+ },
298
+ "GrantId": {
299
+ "title": "GrantId",
300
+ "type": "string",
301
+ "minLength": 1,
302
+ "maxLength": 128,
303
+ "pattern": "^[A-Za-z0-9._:-]+$",
304
+ "description": "A grant's identifier, chosen by the member DID's signer and carried in its grant statement; a UUID is RECOMMENDED. A mediator refuses a grant whose identifier is already on the member DID's record."
305
+ }
306
+ }
307
+ };
308
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
309
+ export const RESPONSE_PAYLOAD_SCHEMA = {
310
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
311
+ "$ref": "#/$defs/Response",
312
+ "$defs": {
313
+ "Response": {
314
+ "$anchor": "response",
315
+ "title": "Messaging — Mux Update — response payload",
316
+ "description": "The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.",
317
+ "type": "object",
318
+ "additionalProperties": false,
319
+ "required": [
320
+ "grant",
321
+ "changed"
322
+ ],
323
+ "properties": {
324
+ "grant": {
325
+ "$ref": "#/$defs/GrantView",
326
+ "description": "The grant as it now stands."
327
+ },
328
+ "changed": {
329
+ "type": "boolean",
330
+ "description": "False when the request named the values already in force."
331
+ },
332
+ "ext": {
333
+ "$ref": "#/$defs/Ext",
334
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
335
+ }
336
+ }
337
+ },
338
+ "Ext": {
339
+ "title": "Ext",
340
+ "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.",
341
+ "type": "object",
342
+ "minProperties": 1,
343
+ "additionalProperties": true,
344
+ "propertyNames": {
345
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
346
+ }
347
+ },
348
+ "GrantView": {
349
+ "title": "GrantView",
350
+ "type": "object",
351
+ "additionalProperties": false,
352
+ "required": [
353
+ "statement",
354
+ "state",
355
+ "scope",
356
+ "expiresAt"
357
+ ],
358
+ "description": "The mediator's view of one stored grant, as messaging/mux/list and messaging/mux/update return it: the grant statement verbatim, with the state and the effective scope and expiry beside it.",
359
+ "properties": {
360
+ "statement": {
361
+ "$ref": "#/$defs/GrantStatement",
362
+ "description": "The grant statement exactly as the member signed it and the mediator stored it, proof included, so either party can re-verify it."
363
+ },
364
+ "state": {
365
+ "$ref": "#/$defs/GrantState"
366
+ },
367
+ "scope": {
368
+ "$ref": "#/$defs/MuxScope",
369
+ "description": "The effective scope: the signed scope, or the narrower one messaging/mux/update set."
370
+ },
371
+ "expiresAt": {
372
+ "type": "string",
373
+ "format": "date-time",
374
+ "description": "The effective expiry: the signed `exp` rendered as RFC 3339, or the earlier one messaging/mux/update set."
375
+ },
376
+ "narrowed": {
377
+ "type": "boolean",
378
+ "description": "True when messaging/mux/update narrowed the effective scope or expiry below what the statement signs."
379
+ },
380
+ "attachedNow": {
381
+ "type": "boolean",
382
+ "description": "Principal view only: whether the member is attached through this grant to the connection that carried the list request."
383
+ }
384
+ }
385
+ },
386
+ "MuxScope": {
387
+ "title": "MuxScope",
388
+ "type": "array",
389
+ "minItems": 1,
390
+ "maxItems": 16,
391
+ "items": {
392
+ "$ref": "#/$defs/MuxScopeValue"
393
+ },
394
+ "description": "A set of capabilities: a non-empty JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses into one. Never empty: an empty scope is refused, never read as \"all\". There is no default scope anywhere — every attach and every grant names its scope explicitly. A scope is always bounded by the member DID's own access-control capabilities at the mediator."
395
+ },
396
+ "MuxScopeValue": {
397
+ "title": "MuxScopeValue",
398
+ "type": "string",
399
+ "enum": [
400
+ "receive",
401
+ "pickup",
402
+ "delete",
403
+ "send"
404
+ ],
405
+ "description": "One capability a member DID extends to a principal's connection. `receive`: live delivery of the member's inbound messages on the connection. `pickup`: message-pickup status and delivery requests naming the member as `recipient_did`, and inclusion in a raw-TSP inbox drain. `delete`: deleting the member's stored messages, including delete-on-ack and delete-on-send; a member without `delete` keeps its messages in its inbox until something holding `delete` collects them. `send`: the mediator accepts on this connection frames whose sender is the member DID — the frame is still signed or authcrypted with the member's own keys; the scope only lets the mediator accept it on this socket."
406
+ },
407
+ "GrantState": {
408
+ "title": "GrantState",
409
+ "type": "string",
410
+ "enum": [
411
+ "active",
412
+ "suspended",
413
+ "staleKey",
414
+ "expired",
415
+ "epochRevoked"
416
+ ],
417
+ "description": "A stored grant's state. `active`: valid; the member is attached whenever the principal is connected. `suspended`: the member DID proved control with a key that signed none of its active grants (the unknown-key rule); terminal — the grant cannot be resumed and must be recreated by a fresh member signature. `staleKey`: the key that signed the grant is no longer in the member DID's current authentication relationship; terminal — it does not become active again if the key reappears. `expired`: an active grant past its effective expiry; computed when read, never stored. `epochRevoked`: the member DID advanced its epoch with messaging/mux/revoke-all. A grant revoked with messaging/mux/revoke has no state: it is deleted. A dead grant (every state but `active`) stays listable for the mediator's retention window after its effective expiry, then is pruned."
418
+ },
419
+ "GrantStatement": {
420
+ "title": "GrantStatement",
421
+ "type": "object",
422
+ "additionalProperties": false,
423
+ "required": [
424
+ "type",
425
+ "issuer",
426
+ "audience",
427
+ "grantId",
428
+ "principal",
429
+ "scope",
430
+ "epoch",
431
+ "iat",
432
+ "exp",
433
+ "proof"
434
+ ],
435
+ "description": "A member DID's standing statement that the named principal may carry its traffic at this mediator, on any connection, until `exp`, within `scope`, under the member's current `epoch`. Signed by the member with an embedded Data Integrity proof whose purpose is `authentication`, and stored verbatim by the mediator as the only evidence of the delegation.",
436
+ "properties": {
437
+ "type": {
438
+ "type": "string",
439
+ "const": "muxGrant",
440
+ "description": "Always `muxGrant`; names the statement kind, so a statement of one kind is never accepted as another."
441
+ },
442
+ "issuer": {
443
+ "$ref": "#/$defs/MuxDid",
444
+ "description": "The member DID: the signer, and the DID the statement concerns."
445
+ },
446
+ "audience": {
447
+ "$ref": "#/$defs/MuxDid",
448
+ "description": "The mediator's DID. A statement names exactly one mediator and is refused by every other."
449
+ },
450
+ "grantId": {
451
+ "$ref": "#/$defs/GrantId"
452
+ },
453
+ "principal": {
454
+ "$ref": "#/$defs/MuxDid",
455
+ "description": "The principal DID that may carry the member's traffic. MUST differ from `issuer`."
456
+ },
457
+ "scope": {
458
+ "$ref": "#/$defs/StatementScope"
459
+ },
460
+ "epoch": {
461
+ "type": "integer",
462
+ "minimum": 0,
463
+ "description": "The member DID's current epoch at the mediator. Only messaging/mux/revoke-all advances it."
464
+ },
465
+ "iat": {
466
+ "type": "integer",
467
+ "minimum": 0,
468
+ "description": "JWT NumericDate (RFC 7519 §2), whole seconds since 1970-01-01T00:00:00Z UTC: when the statement was signed. MUST NOT be more than 60 seconds in the mediator's future."
469
+ },
470
+ "exp": {
471
+ "type": "integer",
472
+ "minimum": 0,
473
+ "description": "JWT NumericDate (RFC 7519 §2): when the statement stops being accepted. REQUIRED; MUST be after `iat` and in the future."
474
+ },
475
+ "proof": {
476
+ "$ref": "#/$defs/MuxDataIntegrityProof"
477
+ }
478
+ }
479
+ },
480
+ "MuxDataIntegrityProof": {
481
+ "title": "MuxDataIntegrityProof",
482
+ "type": "object",
483
+ "additionalProperties": false,
484
+ "required": [
485
+ "type",
486
+ "cryptosuite",
487
+ "verificationMethod",
488
+ "proofPurpose",
489
+ "proofValue"
490
+ ],
491
+ "description": "The W3C Data Integrity proof embedded in a mux statement, made by the member DID: the format and verifier Trust Tasks already use for document proofs (SPEC §4.7). The proof covers the whole statement except `proof` itself, as the cryptosuite defines. Closed: a member Data Integrity defines but this list omits is refused.",
492
+ "properties": {
493
+ "type": {
494
+ "type": "string",
495
+ "const": "DataIntegrityProof"
496
+ },
497
+ "cryptosuite": {
498
+ "type": "string",
499
+ "enum": [
500
+ "eddsa-jcs-2022",
501
+ "eddsa-rdfc-2022"
502
+ ],
503
+ "description": "The W3C Data Integrity EdDSA cryptosuite used."
504
+ },
505
+ "verificationMethod": {
506
+ "type": "string",
507
+ "minLength": 5,
508
+ "maxLength": 2048,
509
+ "pattern": "^did:\\S+#\\S+$",
510
+ "description": "The DID URL of the verification method that signed. MUST be controlled by the statement's `issuer` and listed in that DID's current `authentication` relationship."
511
+ },
512
+ "proofPurpose": {
513
+ "type": "string",
514
+ "minLength": 1,
515
+ "maxLength": 64,
516
+ "description": "MUST be `authentication`. Any other value is refused with `messaging/mux:proofPurposeInvalid` — a proof made for another relationship (an `assertionMethod` credential signature, say) is never accepted as control of the DID."
517
+ },
518
+ "created": {
519
+ "type": "string",
520
+ "format": "date-time",
521
+ "description": "OPTIONAL: when the proof was made, as Data Integrity defines it. Covered by the proof; the statement's own `iat` is what the mediator checks."
522
+ },
523
+ "proofValue": {
524
+ "type": "string",
525
+ "minLength": 2,
526
+ "maxLength": 4096,
527
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
528
+ "description": "The multibase (base58btc) signature."
529
+ }
530
+ }
531
+ },
532
+ "StatementScope": {
533
+ "title": "StatementScope",
534
+ "type": "array",
535
+ "maxItems": 16,
536
+ "items": {
537
+ "$ref": "#/$defs/MuxScopeValue"
538
+ },
539
+ "description": "The scope a member DID signs into a statement: a JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses. It MUST NOT be empty; an empty signed scope is refused with the task's `emptyScope` code, never read as \"all\". Unlike MuxScope, emptiness is not a schema failure here, so that the refusal is reported per statement rather than failing the whole batch."
540
+ },
541
+ "MuxDid": {
542
+ "title": "MuxDid",
543
+ "type": "string",
544
+ "minLength": 7,
545
+ "maxLength": 2048,
546
+ "pattern": "^did:[a-z0-9]+:\\S+$",
547
+ "description": "A DID, carried verbatim and compared by exact string equality. Unlike the messaging family's `Vid`, never a hash: the mediator resolves it to verify a statement signed by it. For a member DID reached over TSP, the TSP VID is the DID itself."
548
+ },
549
+ "GrantId": {
550
+ "title": "GrantId",
551
+ "type": "string",
552
+ "minLength": 1,
553
+ "maxLength": 128,
554
+ "pattern": "^[A-Za-z0-9._:-]+$",
555
+ "description": "A grant's identifier, chosen by the member DID's signer and carried in its grant statement; a UUID is RECOMMENDED. A mediator refuses a grant whose identifier is already on the member DID's record."
556
+ }
557
+ }
558
+ };
559
+ /**
560
+ * SPEC.md §7.2 policy for the request variant, from this specification's
561
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
562
+ * per-specification and cannot be derived from the document alone, and
563
+ * item 2 needs the schema this carries.
564
+ */
565
+ export const SPEC = {
566
+ typeUri: TYPE_URI,
567
+ isBearer: false,
568
+ isProofRequired: true,
569
+ isRecipientRequired: true,
570
+ isIssuedAtRequired: true,
571
+ payloadSchema: PAYLOAD_SCHEMA,
572
+ };
573
+ /**
574
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
575
+ * tracks the *issuer* party's requirement because a response swaps the
576
+ * parties (§7.3 item 5).
577
+ */
578
+ export const RESPONSE_SPEC = {
579
+ typeUri: RESPONSE_TYPE_URI,
580
+ isBearer: false,
581
+ isProofRequired: false,
582
+ isRecipientRequired: true,
583
+ isIssuedAtRequired: true,
584
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
585
+ };
586
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/messaging/mux/update/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAExF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB,IAAI,CAAC;AAK/C,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC;AAK1G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,sDAAsD;IAC7D,OAAO,EAAE,kCAAkC;IAC3C,aAAa,EAAE,oMAAoM;IACnN,MAAM,EAAE,QAAQ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ACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/_shared/0.1/memory-record.schema.json
4
+ */
5
+ /**
6
+ * Agent memory is free-form text an agent stores in a VTA context so it can recall it across sessions. A memory item is addressed by the pair `(contextId, key)`; `MemoryRecord` is the shape every versioned task in the family hands back, defined once here because `list`, `get` and the conflict details of `put` and `delete` all return the same record and an inline copy per task would fork the moment one of them gained a member.
7
+ *
8
+ * The version counter is the family's load-bearing invariant and is described once, here, on the same terms as `vta/app-state/*`'s. `version` is a monotonically increasing integer maintained per `contextId`, NOT per item: every write in a context — a put or a delete — takes the next value of that context's counter, and an item's `version` is the counter value its most recent write took. One number therefore serves two purposes: it is the optimistic-concurrency token `expectedVersion` is compared against, and it is the watermark `sinceVersion` is compared against. A per-item counter could do the first but not the second, because two items' counters are not comparable and so no single number could mean "everything changed after this point". Consumers MUST treat version numbers as opaque and monotonic: an item's version can jump by any amount between two writes, because writes to other items in the context consumed the intervening values.
9
+ *
10
+ * The counter is per context because the context is the family's isolation boundary: memory has no namespace below it, and a counter spanning contexts would let a reader of one context observe how much traffic another carried.
11
+ *
12
+ * Timestamp invariants (SHOULD-level, prose — not expressible in JSON Schema): when `createdAt` is present, `updatedAt >= createdAt`; when `deletedAt` is present, `deleted` is true and `deletedAt >= createdAt`. Consumers SHOULD reject documents that violate either.
13
+ */
14
+ export interface MemoryRecordSharedDefinitionForVtaMemoryFromPutDeleteList02AndGet01 {
15
+ [k: string]: unknown | undefined;
16
+ }
17
+ /**
18
+ * The definitions this shared schema publishes, hoisted to one declaration each.
19
+ * See "../../../_shared/components.js".
20
+ */
21
+ export type { MemoryExpectedVersion, MemoryKey, MemoryRecord, MemoryValue, MemoryVersion } from "../../../_shared/components.js";
22
+ //# sourceMappingURL=memory-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-record.d.ts","sourceRoot":"","sources":["../../../../src/vta/_shared/0.1/memory-record.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,mEAAmE;IAClF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED;;;GAGG;AACH,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/_shared/0.1/memory-record.schema.json
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=memory-record.js.map