@openvtc/trust-tasks 0.16.8 → 0.16.9

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 (50) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/dist/_shared/components.d.ts +2 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
  25. package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
  26. package/dist/rooms/keys/commit/0.1/payload.js +146 -0
  27. package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
  28. package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
  29. package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
  30. package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
  31. package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
  32. package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
  33. package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
  34. package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
  35. package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
  36. package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
  37. package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
  38. package/dist/rooms/records/curate/0.1/payload.js +277 -0
  39. package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
  40. package/package.json +1 -1
  41. package/src/_shared/components.ts +6 -2
  42. package/src/device/list/0.1/payload.ts +6 -2
  43. package/src/device/list/0.2/payload.ts +6 -2
  44. package/src/device/register/0.1/payload.ts +6 -2
  45. package/src/device/register/0.2/payload.ts +6 -2
  46. package/src/index.ts +4 -0
  47. package/src/rooms/keys/commit/0.1/payload.ts +195 -0
  48. package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
  49. package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
  50. package/src/rooms/records/curate/0.1/payload.ts +357 -0
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/key-package/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An invited party asks the agent that will hold its room keys to mint an MLS KeyPackage, so the room's owner can add it to the group. The private half stays with the agent; only the KeyPackage travels.
11
+ */
12
+ export interface RoomsKeysKeyPackagePayload {
13
+ /**
14
+ * The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * The invitation credential (VIC) the room issued to this party, serialized per the governing profile. Where an implementation requires one — and one that mints group state on unauthenticated request should — this is what authorizes the mint.
19
+ */
20
+ invitation?: string;
21
+ /**
22
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
23
+ */
24
+ ext?: Ext;
25
+ }
26
+ /**
27
+ * Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.1#response.
28
+ */
29
+ export interface RoomsKeysKeyPackageResponsePayload {
30
+ /**
31
+ * The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.
32
+ */
33
+ keyPackage: string;
34
+ /**
35
+ * When the KeyPackage stops being offered. A KeyPackage is single-use and an unused one is retained key material, so an implementation SHOULD bound how long it holds the private half.
36
+ */
37
+ expiresAt?: string;
38
+ ext?: Ext;
39
+ }
40
+
41
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
42
+ export type { Ext };
43
+
44
+ /** Trust Task type URI. */
45
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/key-package/0.1" as const;
46
+
47
+ /** Stable alias for this specification's request payload shape. */
48
+ export type Payload = RoomsKeysKeyPackagePayload;
49
+
50
+ /** Trust Task response type URI (request type URI + "#response"). */
51
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/key-package/0.1#response" as const;
52
+
53
+ /** Stable alias for this specification's success-response payload shape. */
54
+ export type Response = RoomsKeysKeyPackageResponsePayload;
55
+
56
+ /**
57
+ * This specification's payload schema, as a value.
58
+ *
59
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
60
+ * rather than only as a `.json` file because TypeScript types are erased
61
+ * at runtime: without a schema a consumer has nothing to validate, and
62
+ * every REQUIRED payload member is optional in practice. Cross-file
63
+ * `$ref`s are already inlined, so it needs no resolver.
64
+ */
65
+ export const PAYLOAD_SCHEMA = {
66
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
67
+ "$id": "https://trusttasks.org/spec/rooms/keys/key-package/0.1",
68
+ "title": "Rooms Keys Key-Package — payload",
69
+ "description": "An invited party asks the agent that will hold its room keys to mint an MLS KeyPackage, so the room's owner can add it to the group. The private half stays with the agent; only the KeyPackage travels.",
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "roomId"
74
+ ],
75
+ "properties": {
76
+ "roomId": {
77
+ "type": "string",
78
+ "description": "The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny."
79
+ },
80
+ "invitation": {
81
+ "type": "string",
82
+ "description": "The invitation credential (VIC) the room issued to this party, serialized per the governing profile. Where an implementation requires one — and one that mints group state on unauthenticated request should — this is what authorizes the mint."
83
+ },
84
+ "ext": {
85
+ "$ref": "#/$defs/Ext",
86
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
87
+ }
88
+ },
89
+ "$defs": {
90
+ "Response": {
91
+ "$anchor": "response",
92
+ "title": "Rooms Keys Key-Package — response payload",
93
+ "description": "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.1#response.",
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "keyPackage"
98
+ ],
99
+ "properties": {
100
+ "keyPackage": {
101
+ "type": "string",
102
+ "description": "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything."
103
+ },
104
+ "expiresAt": {
105
+ "type": "string",
106
+ "format": "date-time",
107
+ "description": "When the KeyPackage stops being offered. A KeyPackage is single-use and an unused one is retained key material, so an implementation SHOULD bound how long it holds the private half."
108
+ },
109
+ "ext": {
110
+ "$ref": "#/$defs/Ext"
111
+ }
112
+ }
113
+ },
114
+ "Ext": {
115
+ "title": "Ext",
116
+ "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.",
117
+ "type": "object",
118
+ "minProperties": 1,
119
+ "additionalProperties": true,
120
+ "propertyNames": {
121
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
122
+ }
123
+ }
124
+ }
125
+ } as const;
126
+
127
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
128
+ export const RESPONSE_PAYLOAD_SCHEMA = {
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "$ref": "#/$defs/Response",
131
+ "$defs": {
132
+ "Response": {
133
+ "$anchor": "response",
134
+ "title": "Rooms Keys Key-Package — response payload",
135
+ "description": "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.1#response.",
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "keyPackage"
140
+ ],
141
+ "properties": {
142
+ "keyPackage": {
143
+ "type": "string",
144
+ "description": "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything."
145
+ },
146
+ "expiresAt": {
147
+ "type": "string",
148
+ "format": "date-time",
149
+ "description": "When the KeyPackage stops being offered. A KeyPackage is single-use and an unused one is retained key material, so an implementation SHOULD bound how long it holds the private half."
150
+ },
151
+ "ext": {
152
+ "$ref": "#/$defs/Ext"
153
+ }
154
+ }
155
+ },
156
+ "Ext": {
157
+ "title": "Ext",
158
+ "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.",
159
+ "type": "object",
160
+ "minProperties": 1,
161
+ "additionalProperties": true,
162
+ "propertyNames": {
163
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
164
+ }
165
+ }
166
+ }
167
+ } as const;
168
+
169
+ /**
170
+ * SPEC.md §7.2 policy for the request variant, from this specification's
171
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
172
+ * per-specification and cannot be derived from the document alone, and
173
+ * item 2 needs the schema this carries.
174
+ */
175
+ export const SPEC = {
176
+ typeUri: TYPE_URI,
177
+ isBearer: false,
178
+ isProofRequired: true,
179
+ isRecipientRequired: true,
180
+ isIssuedAtRequired: true,
181
+ payloadSchema: PAYLOAD_SCHEMA,
182
+ } as const;
183
+
184
+ /**
185
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
186
+ * tracks the *issuer* party's requirement because a response swaps the
187
+ * parties (§7.3 item 5).
188
+ */
189
+ export const RESPONSE_SPEC = {
190
+ typeUri: RESPONSE_TYPE_URI,
191
+ isBearer: false,
192
+ isProofRequired: true,
193
+ isRecipientRequired: true,
194
+ isIssuedAtRequired: true,
195
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
196
+ } as const;
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/welcome/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A room's owner delivers an MLS Welcome to the agent that will hold a new member's room keys, so it can join the group. The Welcome carries the group's secrets sealed to the recipient's KeyPackage; a recipient that accepts one it was not invited to has been handed key material it should have refused.
11
+ */
12
+ export interface RoomsKeysWelcomePayload {
13
+ /**
14
+ * The room being joined.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * The MLS Welcome message, base64url.
19
+ */
20
+ welcome: string;
21
+ /**
22
+ * The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. A joiner needs the tree to derive the group's secrets; omit it only where the group uses the ratchet-tree extension.
23
+ */
24
+ ratchetTree?: string;
25
+ /**
26
+ * The invitation credential (VIC) the room issued to the joining party, serialized per the governing profile. This is what makes the Welcome acceptable: joining is a two-party act, and a recipient with no matching invitation MUST refuse.
27
+ */
28
+ invitation?: string;
29
+ /**
30
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
31
+ */
32
+ ext?: Ext;
33
+ }
34
+ /**
35
+ * Success response to rooms/keys/welcome. Type https://trusttasks.org/spec/rooms/keys/welcome/0.1#response.
36
+ */
37
+ export interface RoomsKeysWelcomeResponsePayload {
38
+ /**
39
+ * The MLS epoch the recipient joined at. The sender needs this to know which commits the recipient still lacks.
40
+ */
41
+ epoch: number;
42
+ ext?: Ext;
43
+ }
44
+
45
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
46
+ export type { Ext };
47
+
48
+ /** Trust Task type URI. */
49
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/welcome/0.1" as const;
50
+
51
+ /** Stable alias for this specification's request payload shape. */
52
+ export type Payload = RoomsKeysWelcomePayload;
53
+
54
+ /** Trust Task response type URI (request type URI + "#response"). */
55
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/welcome/0.1#response" as const;
56
+
57
+ /** Stable alias for this specification's success-response payload shape. */
58
+ export type Response = RoomsKeysWelcomeResponsePayload;
59
+
60
+ /**
61
+ * This specification's payload schema, as a value.
62
+ *
63
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
64
+ * rather than only as a `.json` file because TypeScript types are erased
65
+ * at runtime: without a schema a consumer has nothing to validate, and
66
+ * every REQUIRED payload member is optional in practice. Cross-file
67
+ * `$ref`s are already inlined, so it needs no resolver.
68
+ */
69
+ export const PAYLOAD_SCHEMA = {
70
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
71
+ "$id": "https://trusttasks.org/spec/rooms/keys/welcome/0.1",
72
+ "title": "Rooms Keys Welcome — payload",
73
+ "description": "A room's owner delivers an MLS Welcome to the agent that will hold a new member's room keys, so it can join the group. The Welcome carries the group's secrets sealed to the recipient's KeyPackage; a recipient that accepts one it was not invited to has been handed key material it should have refused.",
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "roomId",
78
+ "welcome"
79
+ ],
80
+ "properties": {
81
+ "roomId": {
82
+ "type": "string",
83
+ "description": "The room being joined."
84
+ },
85
+ "welcome": {
86
+ "type": "string",
87
+ "description": "The MLS Welcome message, base64url."
88
+ },
89
+ "ratchetTree": {
90
+ "type": "string",
91
+ "description": "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. A joiner needs the tree to derive the group's secrets; omit it only where the group uses the ratchet-tree extension."
92
+ },
93
+ "invitation": {
94
+ "type": "string",
95
+ "description": "The invitation credential (VIC) the room issued to the joining party, serialized per the governing profile. This is what makes the Welcome acceptable: joining is a two-party act, and a recipient with no matching invitation MUST refuse."
96
+ },
97
+ "ext": {
98
+ "$ref": "#/$defs/Ext",
99
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
100
+ }
101
+ },
102
+ "$defs": {
103
+ "Response": {
104
+ "$anchor": "response",
105
+ "title": "Rooms Keys Welcome — response payload",
106
+ "description": "Success response to rooms/keys/welcome. Type https://trusttasks.org/spec/rooms/keys/welcome/0.1#response.",
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": [
110
+ "epoch"
111
+ ],
112
+ "properties": {
113
+ "epoch": {
114
+ "type": "integer",
115
+ "minimum": 0,
116
+ "description": "The MLS epoch the recipient joined at. The sender needs this to know which commits the recipient still lacks."
117
+ },
118
+ "ext": {
119
+ "$ref": "#/$defs/Ext"
120
+ }
121
+ }
122
+ },
123
+ "Ext": {
124
+ "title": "Ext",
125
+ "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.",
126
+ "type": "object",
127
+ "minProperties": 1,
128
+ "additionalProperties": true,
129
+ "propertyNames": {
130
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
131
+ }
132
+ }
133
+ }
134
+ } as const;
135
+
136
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
137
+ export const RESPONSE_PAYLOAD_SCHEMA = {
138
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
139
+ "$ref": "#/$defs/Response",
140
+ "$defs": {
141
+ "Response": {
142
+ "$anchor": "response",
143
+ "title": "Rooms Keys Welcome — response payload",
144
+ "description": "Success response to rooms/keys/welcome. Type https://trusttasks.org/spec/rooms/keys/welcome/0.1#response.",
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "epoch"
149
+ ],
150
+ "properties": {
151
+ "epoch": {
152
+ "type": "integer",
153
+ "minimum": 0,
154
+ "description": "The MLS epoch the recipient joined at. The sender needs this to know which commits the recipient still lacks."
155
+ },
156
+ "ext": {
157
+ "$ref": "#/$defs/Ext"
158
+ }
159
+ }
160
+ },
161
+ "Ext": {
162
+ "title": "Ext",
163
+ "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.",
164
+ "type": "object",
165
+ "minProperties": 1,
166
+ "additionalProperties": true,
167
+ "propertyNames": {
168
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
169
+ }
170
+ }
171
+ }
172
+ } as const;
173
+
174
+ /**
175
+ * SPEC.md §7.2 policy for the request variant, from this specification's
176
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
177
+ * per-specification and cannot be derived from the document alone, and
178
+ * item 2 needs the schema this carries.
179
+ */
180
+ export const SPEC = {
181
+ typeUri: TYPE_URI,
182
+ isBearer: false,
183
+ isProofRequired: true,
184
+ isRecipientRequired: true,
185
+ isIssuedAtRequired: true,
186
+ payloadSchema: PAYLOAD_SCHEMA,
187
+ } as const;
188
+
189
+ /**
190
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
191
+ * tracks the *issuer* party's requirement because a response swaps the
192
+ * parties (§7.3 item 5).
193
+ */
194
+ export const RESPONSE_SPEC = {
195
+ typeUri: RESPONSE_TYPE_URI,
196
+ isBearer: false,
197
+ isProofRequired: true,
198
+ isRecipientRequired: true,
199
+ isIssuedAtRequired: true,
200
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
201
+ } as const;