@openvtc/trust-tasks 0.27.1 → 0.27.3

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 (228) hide show
  1. package/CHANGELOG.md +218 -0
  2. package/dist/_runtime/consume.d.ts +2 -1
  3. package/dist/_runtime/consume.d.ts.map +1 -1
  4. package/dist/_runtime/consume.js +26 -1
  5. package/dist/_runtime/consume.js.map +1 -1
  6. package/dist/_runtime/document.d.ts +9 -0
  7. package/dist/_runtime/document.d.ts.map +1 -1
  8. package/dist/_runtime/document.js +15 -1
  9. package/dist/_runtime/document.js.map +1 -1
  10. package/dist/_runtime/freshness.d.ts +4 -2
  11. package/dist/_runtime/freshness.d.ts.map +1 -1
  12. package/dist/_runtime/freshness.js +9 -6
  13. package/dist/_runtime/freshness.js.map +1 -1
  14. package/dist/_shared/components.d.ts +346 -23
  15. package/dist/_shared/components.d.ts.map +1 -1
  16. package/dist/device/list/0.1/payload.d.ts +4 -4
  17. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  18. package/dist/device/list/0.1/payload.js +4 -2
  19. package/dist/device/list/0.1/payload.js.map +1 -1
  20. package/dist/device/list/0.2/payload.d.ts +4 -4
  21. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  22. package/dist/device/list/0.2/payload.js +4 -2
  23. package/dist/device/list/0.2/payload.js.map +1 -1
  24. package/dist/device/register/0.1/payload.d.ts +4 -4
  25. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  26. package/dist/device/register/0.1/payload.js +4 -2
  27. package/dist/device/register/0.1/payload.js.map +1 -1
  28. package/dist/device/register/0.2/payload.d.ts +4 -4
  29. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  30. package/dist/device/register/0.2/payload.js +4 -2
  31. package/dist/device/register/0.2/payload.js.map +1 -1
  32. package/dist/index.d.ts +25 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +25 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  37. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  38. package/dist/rooms/create/0.2/payload.d.ts +534 -0
  39. package/dist/rooms/create/0.2/payload.d.ts.map +1 -0
  40. package/dist/rooms/create/0.2/payload.js +293 -0
  41. package/dist/rooms/create/0.2/payload.js.map +1 -0
  42. package/dist/rooms/epoch/chain/0.2/payload.d.ts +534 -0
  43. package/dist/rooms/epoch/chain/0.2/payload.d.ts.map +1 -0
  44. package/dist/rooms/epoch/chain/0.2/payload.js +292 -0
  45. package/dist/rooms/epoch/chain/0.2/payload.js.map +1 -0
  46. package/dist/rooms/epoch/prune/0.2/payload.d.ts +467 -0
  47. package/dist/rooms/epoch/prune/0.2/payload.d.ts.map +1 -0
  48. package/dist/rooms/epoch/prune/0.2/payload.js +251 -0
  49. package/dist/rooms/epoch/prune/0.2/payload.js.map +1 -0
  50. package/dist/rooms/info/0.2/payload.d.ts +1129 -0
  51. package/dist/rooms/info/0.2/payload.d.ts.map +1 -0
  52. package/dist/rooms/info/0.2/payload.js +618 -0
  53. package/dist/rooms/info/0.2/payload.js.map +1 -0
  54. package/dist/rooms/keys/backfill/0.2/payload.d.ts +380 -0
  55. package/dist/rooms/keys/backfill/0.2/payload.d.ts.map +1 -0
  56. package/dist/rooms/keys/backfill/0.2/payload.js +197 -0
  57. package/dist/rooms/keys/backfill/0.2/payload.js.map +1 -0
  58. package/dist/rooms/keys/browse/0.1/payload.d.ts +4 -4
  59. package/dist/rooms/keys/browse/0.1/payload.js +2 -2
  60. package/dist/rooms/keys/browse/0.1/payload.js.map +1 -1
  61. package/dist/rooms/keys/browse/0.2/payload.d.ts +941 -0
  62. package/dist/rooms/keys/browse/0.2/payload.d.ts.map +1 -0
  63. package/dist/rooms/keys/browse/0.2/payload.js +558 -0
  64. package/dist/rooms/keys/browse/0.2/payload.js.map +1 -0
  65. package/dist/rooms/keys/chain/0.2/payload.d.ts +450 -0
  66. package/dist/rooms/keys/chain/0.2/payload.d.ts.map +1 -0
  67. package/dist/rooms/keys/chain/0.2/payload.js +248 -0
  68. package/dist/rooms/keys/chain/0.2/payload.js.map +1 -0
  69. package/dist/rooms/keys/profile/read/0.1/payload.d.ts +4 -4
  70. package/dist/rooms/keys/profile/read/0.1/payload.js +2 -2
  71. package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -1
  72. package/dist/rooms/keys/read/0.1/payload.d.ts +4 -4
  73. package/dist/rooms/keys/read/0.1/payload.js +2 -2
  74. package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
  75. package/dist/rooms/owner/anchor/0.1/payload.d.ts +4 -4
  76. package/dist/rooms/owner/anchor/0.1/payload.js +2 -2
  77. package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -1
  78. package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
  79. package/dist/rooms/records/get/0.1/payload.js +2 -2
  80. package/dist/rooms/records/get/0.1/payload.js.map +1 -1
  81. package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
  82. package/dist/rooms/records/get/0.2/payload.js +2 -2
  83. package/dist/rooms/records/get/0.2/payload.js.map +1 -1
  84. package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
  85. package/dist/rooms/records/list/0.1/payload.js +2 -2
  86. package/dist/rooms/records/list/0.1/payload.js.map +1 -1
  87. package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
  88. package/dist/rooms/records/list/0.2/payload.js +2 -2
  89. package/dist/rooms/records/list/0.2/payload.js.map +1 -1
  90. package/dist/rooms/records/list/0.3/payload.d.ts +970 -0
  91. package/dist/rooms/records/list/0.3/payload.d.ts.map +1 -0
  92. package/dist/rooms/records/list/0.3/payload.js +526 -0
  93. package/dist/rooms/records/list/0.3/payload.js.map +1 -0
  94. package/dist/rooms/records/prune/0.1/payload.d.ts +706 -0
  95. package/dist/rooms/records/prune/0.1/payload.d.ts.map +1 -0
  96. package/dist/rooms/records/prune/0.1/payload.js +374 -0
  97. package/dist/rooms/records/prune/0.1/payload.js.map +1 -0
  98. package/dist/rooms/records/put/0.3/payload.d.ts +1212 -0
  99. package/dist/rooms/records/put/0.3/payload.d.ts.map +1 -0
  100. package/dist/rooms/records/put/0.3/payload.js +646 -0
  101. package/dist/rooms/records/put/0.3/payload.js.map +1 -0
  102. package/dist/rooms/records/retention/set/0.1/payload.d.ts +521 -0
  103. package/dist/rooms/records/retention/set/0.1/payload.d.ts.map +1 -0
  104. package/dist/rooms/records/retention/set/0.1/payload.js +276 -0
  105. package/dist/rooms/records/retention/set/0.1/payload.js.map +1 -0
  106. package/dist/vault/credentials/present/0.1/payload.d.ts +407 -0
  107. package/dist/vault/credentials/present/0.1/payload.d.ts.map +1 -0
  108. package/dist/vault/credentials/present/0.1/payload.js +217 -0
  109. package/dist/vault/credentials/present/0.1/payload.js.map +1 -0
  110. package/dist/vault/credentials/query/0.1/payload.d.ts +12 -0
  111. package/dist/vault/credentials/query/0.1/payload.d.ts.map +1 -1
  112. package/dist/vault/credentials/query/0.1/payload.js +4 -0
  113. package/dist/vault/credentials/query/0.1/payload.js.map +1 -1
  114. package/dist/vta/webvh/dids/create/1.2/payload.d.ts +961 -0
  115. package/dist/vta/webvh/dids/create/1.2/payload.d.ts.map +1 -0
  116. package/dist/vta/webvh/dids/create/1.2/payload.js +480 -0
  117. package/dist/vta/webvh/dids/create/1.2/payload.js.map +1 -0
  118. package/dist/vtc/_shared/0.1/room-migration.d.ts +16 -0
  119. package/dist/vtc/_shared/0.1/room-migration.d.ts.map +1 -0
  120. package/dist/vtc/_shared/0.1/room-migration.js +6 -0
  121. package/dist/vtc/_shared/0.1/room-migration.js.map +1 -0
  122. package/dist/vtc/_shared/0.1/room-storage.d.ts +1 -1
  123. package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -1
  124. package/dist/vtc/_shared/0.2/room-storage.d.ts +16 -0
  125. package/dist/vtc/_shared/0.2/room-storage.d.ts.map +1 -0
  126. package/dist/vtc/_shared/0.2/room-storage.js +6 -0
  127. package/dist/vtc/_shared/0.2/room-storage.js.map +1 -0
  128. package/dist/vtc/admin/events/_shared/0.4/topic.d.ts +31 -0
  129. package/dist/vtc/admin/events/_shared/0.4/topic.d.ts.map +1 -0
  130. package/dist/vtc/admin/events/_shared/0.4/topic.js +6 -0
  131. package/dist/vtc/admin/events/_shared/0.4/topic.js.map +1 -0
  132. package/dist/vtc/admin/events/event/0.4/payload.d.ts +172 -0
  133. package/dist/vtc/admin/events/event/0.4/payload.d.ts.map +1 -0
  134. package/dist/vtc/admin/events/event/0.4/payload.js +103 -0
  135. package/dist/vtc/admin/events/event/0.4/payload.js.map +1 -0
  136. package/dist/vtc/admin/events/subscribe/0.4/payload.d.ts +409 -0
  137. package/dist/vtc/admin/events/subscribe/0.4/payload.d.ts.map +1 -0
  138. package/dist/vtc/admin/events/subscribe/0.4/payload.js +238 -0
  139. package/dist/vtc/admin/events/subscribe/0.4/payload.js.map +1 -0
  140. package/dist/vtc/rooms/get/0.2/payload.d.ts +1966 -0
  141. package/dist/vtc/rooms/get/0.2/payload.d.ts.map +1 -0
  142. package/dist/vtc/rooms/get/0.2/payload.js +976 -0
  143. package/dist/vtc/rooms/get/0.2/payload.js.map +1 -0
  144. package/dist/vtc/rooms/storage/migrate/0.2/payload.d.ts +595 -0
  145. package/dist/vtc/rooms/storage/migrate/0.2/payload.d.ts.map +1 -0
  146. package/dist/vtc/rooms/storage/migrate/0.2/payload.js +336 -0
  147. package/dist/vtc/rooms/storage/migrate/0.2/payload.js.map +1 -0
  148. package/dist/vtc/storage/configs/create/0.1/payload.d.ts +1 -1
  149. package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -1
  150. package/dist/vtc/storage/configs/create/0.2/payload.d.ts +1360 -0
  151. package/dist/vtc/storage/configs/create/0.2/payload.d.ts.map +1 -0
  152. package/dist/vtc/storage/configs/create/0.2/payload.js +783 -0
  153. package/dist/vtc/storage/configs/create/0.2/payload.js.map +1 -0
  154. package/dist/vtc/storage/configs/get/0.1/payload.d.ts +1 -1
  155. package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -1
  156. package/dist/vtc/storage/configs/get/0.2/payload.d.ts +1854 -0
  157. package/dist/vtc/storage/configs/get/0.2/payload.d.ts.map +1 -0
  158. package/dist/vtc/storage/configs/get/0.2/payload.js +1075 -0
  159. package/dist/vtc/storage/configs/get/0.2/payload.js.map +1 -0
  160. package/dist/vtc/storage/configs/list/0.1/payload.d.ts +1 -1
  161. package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -1
  162. package/dist/vtc/storage/configs/list/0.2/payload.d.ts +1955 -0
  163. package/dist/vtc/storage/configs/list/0.2/payload.d.ts.map +1 -0
  164. package/dist/vtc/storage/configs/list/0.2/payload.js +1125 -0
  165. package/dist/vtc/storage/configs/list/0.2/payload.js.map +1 -0
  166. package/dist/vtc/storage/configs/update/0.1/payload.d.ts +1 -1
  167. package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -1
  168. package/dist/vtc/storage/configs/update/0.2/payload.d.ts +1362 -0
  169. package/dist/vtc/storage/configs/update/0.2/payload.d.ts.map +1 -0
  170. package/dist/vtc/storage/configs/update/0.2/payload.js +782 -0
  171. package/dist/vtc/storage/configs/update/0.2/payload.js.map +1 -0
  172. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +1 -1
  173. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -1
  174. package/dist/vtc/storage/credentials/set/0.2/payload.d.ts +979 -0
  175. package/dist/vtc/storage/credentials/set/0.2/payload.d.ts.map +1 -0
  176. package/dist/vtc/storage/credentials/set/0.2/payload.js +573 -0
  177. package/dist/vtc/storage/credentials/set/0.2/payload.js.map +1 -0
  178. package/package.json +1 -1
  179. package/src/_runtime/consume.ts +26 -2
  180. package/src/_runtime/document.ts +17 -1
  181. package/src/_runtime/freshness.ts +9 -7
  182. package/src/_shared/components.ts +372 -23
  183. package/src/device/list/0.1/payload.ts +4 -2
  184. package/src/device/list/0.2/payload.ts +4 -2
  185. package/src/device/register/0.1/payload.ts +4 -2
  186. package/src/device/register/0.2/payload.ts +4 -2
  187. package/src/index.ts +25 -0
  188. package/src/rooms/_shared/0.1/room.ts +1 -1
  189. package/src/rooms/create/0.2/payload.ts +364 -0
  190. package/src/rooms/epoch/chain/0.2/payload.ts +347 -0
  191. package/src/rooms/epoch/prune/0.2/payload.ts +315 -0
  192. package/src/rooms/info/0.2/payload.ts +700 -0
  193. package/src/rooms/keys/backfill/0.2/payload.ts +260 -0
  194. package/src/rooms/keys/browse/0.1/payload.ts +2 -2
  195. package/src/rooms/keys/browse/0.2/payload.ts +628 -0
  196. package/src/rooms/keys/chain/0.2/payload.ts +308 -0
  197. package/src/rooms/keys/profile/read/0.1/payload.ts +2 -2
  198. package/src/rooms/keys/read/0.1/payload.ts +2 -2
  199. package/src/rooms/owner/anchor/0.1/payload.ts +2 -2
  200. package/src/rooms/records/get/0.1/payload.ts +2 -2
  201. package/src/rooms/records/get/0.2/payload.ts +2 -2
  202. package/src/rooms/records/list/0.1/payload.ts +2 -2
  203. package/src/rooms/records/list/0.2/payload.ts +2 -2
  204. package/src/rooms/records/list/0.3/payload.ts +601 -0
  205. package/src/rooms/records/prune/0.1/payload.ts +451 -0
  206. package/src/rooms/records/put/0.3/payload.ts +741 -0
  207. package/src/rooms/records/retention/set/0.1/payload.ts +338 -0
  208. package/src/vault/credentials/present/0.1/payload.ts +283 -0
  209. package/src/vault/credentials/query/0.1/payload.ts +8 -0
  210. package/src/vta/webvh/dids/create/1.2/payload.ts +660 -0
  211. package/src/vtc/_shared/0.1/room-migration.ts +17 -0
  212. package/src/vtc/_shared/0.1/room-storage.ts +1 -1
  213. package/src/vtc/_shared/0.2/room-storage.ts +17 -0
  214. package/src/vtc/admin/events/_shared/0.4/topic.ts +32 -0
  215. package/src/vtc/admin/events/event/0.4/payload.ts +137 -0
  216. package/src/vtc/admin/events/subscribe/0.4/payload.ts +318 -0
  217. package/src/vtc/rooms/get/0.2/payload.ts +1372 -0
  218. package/src/vtc/rooms/storage/migrate/0.2/payload.ts +408 -0
  219. package/src/vtc/storage/configs/create/0.1/payload.ts +1 -1
  220. package/src/vtc/storage/configs/create/0.2/payload.ts +830 -0
  221. package/src/vtc/storage/configs/get/0.1/payload.ts +1 -1
  222. package/src/vtc/storage/configs/get/0.2/payload.ts +1110 -0
  223. package/src/vtc/storage/configs/list/0.1/payload.ts +1 -1
  224. package/src/vtc/storage/configs/list/0.2/payload.ts +1177 -0
  225. package/src/vtc/storage/configs/update/0.1/payload.ts +1 -1
  226. package/src/vtc/storage/configs/update/0.2/payload.ts +829 -0
  227. package/src/vtc/storage/credentials/set/0.1/payload.ts +1 -1
  228. package/src/vtc/storage/credentials/set/0.2/payload.ts +619 -0
@@ -0,0 +1,467 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/epoch/prune/0.2/payload.schema.json
4
+ */
5
+ import type { AuthorityPresentation, EpochFloor, Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * A room's owner asks its host to drop the epoch key chain below an epoch, making the history before it unrecoverable for anyone who has not already derived it. 0.2 makes the host keep the room's resulting epoch floor and serve it, so that members' key holders discard what they hold below it.
8
+ */
9
+ export interface RoomsEpochPrunePayload {
10
+ /**
11
+ * The room to prune.
12
+ */
13
+ roomId: string;
14
+ /**
15
+ * Drop every rung numbered *below* this epoch, exactly as 0.1. Rung `N` itself survives and still yields epoch `N − 1`'s key, so the earliest epoch anybody can still derive afterwards — the room's epoch floor — is `N − 1` (`EpochFloor`). To make the history sealed under epochs before `E` unreadable, send `beforeEpoch: E + 1`.
16
+ *
17
+ * `minimum: 2` because pruning below epoch 1 would drop nothing and asking to is a caller that has misunderstood the direction — the chain walks backwards, and epoch 1 is where it ends.
18
+ */
19
+ beforeEpoch: number;
20
+ /**
21
+ * Must confer `admin` at this room's scope. Not `curate`, and not `write`: pruning is not a statement about any record, and every member who can write can curate. It ends the room's ability to open a span of its own history, for everyone, which is the same class of act as advancing the epoch.
22
+ */
23
+ presentation: AuthorityPresentation;
24
+ /**
25
+ * Why, for the room's audit trail. A prune is irreversible and unattributable after the fact — the rungs are simply gone — so the only record of intent is the one made at the time.
26
+ */
27
+ reason?: string;
28
+ /**
29
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
30
+ */
31
+ ext?: Ext;
32
+ }
33
+ /**
34
+ * Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.2#response.
35
+ */
36
+ export interface RoomsEpochPruneResponsePayload {
37
+ roomId: string;
38
+ /**
39
+ * How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.
40
+ */
41
+ pruned: number;
42
+ /**
43
+ * The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.
44
+ */
45
+ earliestRung: number;
46
+ /**
47
+ * The room's epoch floor after this prune: the higher of the floor the host held and `beforeEpoch − 1`. What every member's key holder discards below once it learns it (`EpochFloor`), and what `rooms/epoch/chain` 0.2 serves from now on. Unlike `earliestRung`, a statement of intent rather than of reach: a chain with a gap already reached less far, but the floor is what the owner decided.
48
+ */
49
+ epochFloor: EpochFloor;
50
+ ext?: Ext;
51
+ }
52
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
53
+ export type { AuthorityPresentation, EpochFloor, Ext };
54
+ /** Trust Task type URI. */
55
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/prune/0.2";
56
+ /** Stable alias for this specification's request payload shape. */
57
+ export type Payload = RoomsEpochPrunePayload;
58
+ /** Trust Task response type URI (request type URI + "#response"). */
59
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/prune/0.2#response";
60
+ /** Stable alias for this specification's success-response payload shape. */
61
+ export type Response = RoomsEpochPruneResponsePayload;
62
+ /**
63
+ * This specification's payload schema, as a value.
64
+ *
65
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
66
+ * rather than only as a `.json` file because TypeScript types are erased
67
+ * at runtime: without a schema a consumer has nothing to validate, and
68
+ * every REQUIRED payload member is optional in practice. Cross-file
69
+ * `$ref`s are already inlined, so it needs no resolver.
70
+ */
71
+ export declare const PAYLOAD_SCHEMA: {
72
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
73
+ readonly $id: "https://trusttasks.org/spec/rooms/epoch/prune/0.2";
74
+ readonly title: "Rooms Epoch Prune — payload";
75
+ readonly description: "A room's owner asks its host to drop the epoch key chain below an epoch, making the history before it unrecoverable for anyone who has not already derived it. 0.2 makes the host keep the room's resulting epoch floor and serve it, so that members' key holders discard what they hold below it.";
76
+ readonly type: "object";
77
+ readonly additionalProperties: false;
78
+ readonly required: readonly ["roomId", "beforeEpoch", "presentation"];
79
+ readonly properties: {
80
+ readonly roomId: {
81
+ readonly type: "string";
82
+ readonly description: "The room to prune.";
83
+ };
84
+ readonly beforeEpoch: {
85
+ readonly type: "integer";
86
+ readonly minimum: 2;
87
+ readonly description: "Drop every rung numbered *below* this epoch, exactly as 0.1. Rung `N` itself survives and still yields epoch `N − 1`'s key, so the earliest epoch anybody can still derive afterwards — the room's epoch floor — is `N − 1` (`EpochFloor`). To make the history sealed under epochs before `E` unreadable, send `beforeEpoch: E + 1`.\n\n`minimum: 2` because pruning below epoch 1 would drop nothing and asking to is a caller that has misunderstood the direction — the chain walks backwards, and epoch 1 is where it ends.";
88
+ };
89
+ readonly presentation: {
90
+ readonly $ref: "#/$defs/AuthorityPresentation";
91
+ readonly description: "Must confer `admin` at this room's scope. Not `curate`, and not `write`: pruning is not a statement about any record, and every member who can write can curate. It ends the room's ability to open a span of its own history, for everyone, which is the same class of act as advancing the epoch.";
92
+ };
93
+ readonly reason: {
94
+ readonly type: "string";
95
+ readonly maxLength: 512;
96
+ readonly description: "Why, for the room's audit trail. A prune is irreversible and unattributable after the fact — the rungs are simply gone — so the only record of intent is the one made at the time.";
97
+ };
98
+ readonly ext: {
99
+ readonly $ref: "#/$defs/Ext";
100
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
101
+ };
102
+ };
103
+ readonly $defs: {
104
+ readonly Response: {
105
+ readonly $anchor: "response";
106
+ readonly type: "object";
107
+ readonly additionalProperties: false;
108
+ readonly required: readonly ["roomId", "pruned", "earliestRung", "epochFloor"];
109
+ readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.2#response.";
110
+ readonly properties: {
111
+ readonly roomId: {
112
+ readonly type: "string";
113
+ };
114
+ readonly pruned: {
115
+ readonly type: "integer";
116
+ readonly minimum: 0;
117
+ readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
118
+ };
119
+ readonly earliestRung: {
120
+ readonly type: "integer";
121
+ readonly minimum: 1;
122
+ readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
123
+ };
124
+ readonly epochFloor: {
125
+ readonly $ref: "#/$defs/EpochFloor";
126
+ readonly description: "The room's epoch floor after this prune: the higher of the floor the host held and `beforeEpoch − 1`. What every member's key holder discards below once it learns it (`EpochFloor`), and what `rooms/epoch/chain` 0.2 serves from now on. Unlike `earliestRung`, a statement of intent rather than of reach: a chain with a gap already reached less far, but the floor is what the owner decided.";
127
+ };
128
+ readonly ext: {
129
+ readonly $ref: "#/$defs/Ext";
130
+ };
131
+ };
132
+ readonly title: "Rooms Epoch Prune — response payload";
133
+ };
134
+ readonly Ext: {
135
+ readonly title: "Ext";
136
+ 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.";
137
+ readonly type: "object";
138
+ readonly minProperties: 1;
139
+ readonly additionalProperties: true;
140
+ readonly propertyNames: {
141
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
142
+ };
143
+ };
144
+ readonly EpochFloor: {
145
+ readonly title: "EpochFloor";
146
+ readonly type: "integer";
147
+ readonly minimum: 1;
148
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
149
+ };
150
+ readonly AuthorityPresentation: {
151
+ readonly title: "AuthorityPresentation";
152
+ readonly type: "object";
153
+ readonly additionalProperties: false;
154
+ readonly required: readonly ["membership", "authority"];
155
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
156
+ readonly properties: {
157
+ readonly membership: {
158
+ readonly type: "string";
159
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
160
+ };
161
+ readonly authority: {
162
+ readonly type: "array";
163
+ readonly minItems: 1;
164
+ readonly maxItems: 8;
165
+ readonly items: {
166
+ readonly type: "string";
167
+ };
168
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
169
+ };
170
+ readonly subjectBinding: {
171
+ readonly type: "string";
172
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
173
+ };
174
+ };
175
+ };
176
+ };
177
+ };
178
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
179
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
180
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
181
+ readonly $ref: "#/$defs/Response";
182
+ readonly $defs: {
183
+ readonly Response: {
184
+ readonly $anchor: "response";
185
+ readonly type: "object";
186
+ readonly additionalProperties: false;
187
+ readonly required: readonly ["roomId", "pruned", "earliestRung", "epochFloor"];
188
+ readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.2#response.";
189
+ readonly properties: {
190
+ readonly roomId: {
191
+ readonly type: "string";
192
+ };
193
+ readonly pruned: {
194
+ readonly type: "integer";
195
+ readonly minimum: 0;
196
+ readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
197
+ };
198
+ readonly earliestRung: {
199
+ readonly type: "integer";
200
+ readonly minimum: 1;
201
+ readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
202
+ };
203
+ readonly epochFloor: {
204
+ readonly $ref: "#/$defs/EpochFloor";
205
+ readonly description: "The room's epoch floor after this prune: the higher of the floor the host held and `beforeEpoch − 1`. What every member's key holder discards below once it learns it (`EpochFloor`), and what `rooms/epoch/chain` 0.2 serves from now on. Unlike `earliestRung`, a statement of intent rather than of reach: a chain with a gap already reached less far, but the floor is what the owner decided.";
206
+ };
207
+ readonly ext: {
208
+ readonly $ref: "#/$defs/Ext";
209
+ };
210
+ };
211
+ readonly title: "Rooms Epoch Prune — response payload";
212
+ };
213
+ readonly Ext: {
214
+ readonly title: "Ext";
215
+ 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.";
216
+ readonly type: "object";
217
+ readonly minProperties: 1;
218
+ readonly additionalProperties: true;
219
+ readonly propertyNames: {
220
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
221
+ };
222
+ };
223
+ readonly EpochFloor: {
224
+ readonly title: "EpochFloor";
225
+ readonly type: "integer";
226
+ readonly minimum: 1;
227
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
228
+ };
229
+ readonly AuthorityPresentation: {
230
+ readonly title: "AuthorityPresentation";
231
+ readonly type: "object";
232
+ readonly additionalProperties: false;
233
+ readonly required: readonly ["membership", "authority"];
234
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
235
+ readonly properties: {
236
+ readonly membership: {
237
+ readonly type: "string";
238
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
239
+ };
240
+ readonly authority: {
241
+ readonly type: "array";
242
+ readonly minItems: 1;
243
+ readonly maxItems: 8;
244
+ readonly items: {
245
+ readonly type: "string";
246
+ };
247
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
248
+ };
249
+ readonly subjectBinding: {
250
+ readonly type: "string";
251
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
252
+ };
253
+ };
254
+ };
255
+ };
256
+ };
257
+ /**
258
+ * SPEC.md §7.2 policy for the request variant, from this specification's
259
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
260
+ * per-specification and cannot be derived from the document alone, and
261
+ * item 2 needs the schema this carries.
262
+ */
263
+ export declare const SPEC: {
264
+ readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/prune/0.2";
265
+ readonly isBearer: false;
266
+ readonly isProofRequired: true;
267
+ readonly isRecipientRequired: true;
268
+ readonly isIssuedAtRequired: true;
269
+ readonly payloadSchema: {
270
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
271
+ readonly $id: "https://trusttasks.org/spec/rooms/epoch/prune/0.2";
272
+ readonly title: "Rooms Epoch Prune — payload";
273
+ readonly description: "A room's owner asks its host to drop the epoch key chain below an epoch, making the history before it unrecoverable for anyone who has not already derived it. 0.2 makes the host keep the room's resulting epoch floor and serve it, so that members' key holders discard what they hold below it.";
274
+ readonly type: "object";
275
+ readonly additionalProperties: false;
276
+ readonly required: readonly ["roomId", "beforeEpoch", "presentation"];
277
+ readonly properties: {
278
+ readonly roomId: {
279
+ readonly type: "string";
280
+ readonly description: "The room to prune.";
281
+ };
282
+ readonly beforeEpoch: {
283
+ readonly type: "integer";
284
+ readonly minimum: 2;
285
+ readonly description: "Drop every rung numbered *below* this epoch, exactly as 0.1. Rung `N` itself survives and still yields epoch `N − 1`'s key, so the earliest epoch anybody can still derive afterwards — the room's epoch floor — is `N − 1` (`EpochFloor`). To make the history sealed under epochs before `E` unreadable, send `beforeEpoch: E + 1`.\n\n`minimum: 2` because pruning below epoch 1 would drop nothing and asking to is a caller that has misunderstood the direction — the chain walks backwards, and epoch 1 is where it ends.";
286
+ };
287
+ readonly presentation: {
288
+ readonly $ref: "#/$defs/AuthorityPresentation";
289
+ readonly description: "Must confer `admin` at this room's scope. Not `curate`, and not `write`: pruning is not a statement about any record, and every member who can write can curate. It ends the room's ability to open a span of its own history, for everyone, which is the same class of act as advancing the epoch.";
290
+ };
291
+ readonly reason: {
292
+ readonly type: "string";
293
+ readonly maxLength: 512;
294
+ readonly description: "Why, for the room's audit trail. A prune is irreversible and unattributable after the fact — the rungs are simply gone — so the only record of intent is the one made at the time.";
295
+ };
296
+ readonly ext: {
297
+ readonly $ref: "#/$defs/Ext";
298
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
299
+ };
300
+ };
301
+ readonly $defs: {
302
+ readonly Response: {
303
+ readonly $anchor: "response";
304
+ readonly type: "object";
305
+ readonly additionalProperties: false;
306
+ readonly required: readonly ["roomId", "pruned", "earliestRung", "epochFloor"];
307
+ readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.2#response.";
308
+ readonly properties: {
309
+ readonly roomId: {
310
+ readonly type: "string";
311
+ };
312
+ readonly pruned: {
313
+ readonly type: "integer";
314
+ readonly minimum: 0;
315
+ readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
316
+ };
317
+ readonly earliestRung: {
318
+ readonly type: "integer";
319
+ readonly minimum: 1;
320
+ readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
321
+ };
322
+ readonly epochFloor: {
323
+ readonly $ref: "#/$defs/EpochFloor";
324
+ readonly description: "The room's epoch floor after this prune: the higher of the floor the host held and `beforeEpoch − 1`. What every member's key holder discards below once it learns it (`EpochFloor`), and what `rooms/epoch/chain` 0.2 serves from now on. Unlike `earliestRung`, a statement of intent rather than of reach: a chain with a gap already reached less far, but the floor is what the owner decided.";
325
+ };
326
+ readonly ext: {
327
+ readonly $ref: "#/$defs/Ext";
328
+ };
329
+ };
330
+ readonly title: "Rooms Epoch Prune — response payload";
331
+ };
332
+ readonly Ext: {
333
+ readonly title: "Ext";
334
+ 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.";
335
+ readonly type: "object";
336
+ readonly minProperties: 1;
337
+ readonly additionalProperties: true;
338
+ readonly propertyNames: {
339
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
340
+ };
341
+ };
342
+ readonly EpochFloor: {
343
+ readonly title: "EpochFloor";
344
+ readonly type: "integer";
345
+ readonly minimum: 1;
346
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
347
+ };
348
+ readonly AuthorityPresentation: {
349
+ readonly title: "AuthorityPresentation";
350
+ readonly type: "object";
351
+ readonly additionalProperties: false;
352
+ readonly required: readonly ["membership", "authority"];
353
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
354
+ readonly properties: {
355
+ readonly membership: {
356
+ readonly type: "string";
357
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
358
+ };
359
+ readonly authority: {
360
+ readonly type: "array";
361
+ readonly minItems: 1;
362
+ readonly maxItems: 8;
363
+ readonly items: {
364
+ readonly type: "string";
365
+ };
366
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
367
+ };
368
+ readonly subjectBinding: {
369
+ readonly type: "string";
370
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
371
+ };
372
+ };
373
+ };
374
+ };
375
+ };
376
+ };
377
+ /**
378
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
379
+ * tracks the *issuer* party's requirement because a response swaps the
380
+ * parties (§7.3 item 5).
381
+ */
382
+ export declare const RESPONSE_SPEC: {
383
+ readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/prune/0.2#response";
384
+ readonly isBearer: false;
385
+ readonly isProofRequired: true;
386
+ readonly isRecipientRequired: true;
387
+ readonly isIssuedAtRequired: true;
388
+ readonly payloadSchema: {
389
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
390
+ readonly $ref: "#/$defs/Response";
391
+ readonly $defs: {
392
+ readonly Response: {
393
+ readonly $anchor: "response";
394
+ readonly type: "object";
395
+ readonly additionalProperties: false;
396
+ readonly required: readonly ["roomId", "pruned", "earliestRung", "epochFloor"];
397
+ readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.2#response.";
398
+ readonly properties: {
399
+ readonly roomId: {
400
+ readonly type: "string";
401
+ };
402
+ readonly pruned: {
403
+ readonly type: "integer";
404
+ readonly minimum: 0;
405
+ readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
406
+ };
407
+ readonly earliestRung: {
408
+ readonly type: "integer";
409
+ readonly minimum: 1;
410
+ readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
411
+ };
412
+ readonly epochFloor: {
413
+ readonly $ref: "#/$defs/EpochFloor";
414
+ readonly description: "The room's epoch floor after this prune: the higher of the floor the host held and `beforeEpoch − 1`. What every member's key holder discards below once it learns it (`EpochFloor`), and what `rooms/epoch/chain` 0.2 serves from now on. Unlike `earliestRung`, a statement of intent rather than of reach: a chain with a gap already reached less far, but the floor is what the owner decided.";
415
+ };
416
+ readonly ext: {
417
+ readonly $ref: "#/$defs/Ext";
418
+ };
419
+ };
420
+ readonly title: "Rooms Epoch Prune — response payload";
421
+ };
422
+ readonly Ext: {
423
+ readonly title: "Ext";
424
+ 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.";
425
+ readonly type: "object";
426
+ readonly minProperties: 1;
427
+ readonly additionalProperties: true;
428
+ readonly propertyNames: {
429
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
430
+ };
431
+ };
432
+ readonly EpochFloor: {
433
+ readonly title: "EpochFloor";
434
+ readonly type: "integer";
435
+ readonly minimum: 1;
436
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
437
+ };
438
+ readonly AuthorityPresentation: {
439
+ readonly title: "AuthorityPresentation";
440
+ readonly type: "object";
441
+ readonly additionalProperties: false;
442
+ readonly required: readonly ["membership", "authority"];
443
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
444
+ readonly properties: {
445
+ readonly membership: {
446
+ readonly type: "string";
447
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
448
+ };
449
+ readonly authority: {
450
+ readonly type: "array";
451
+ readonly minItems: 1;
452
+ readonly maxItems: 8;
453
+ readonly items: {
454
+ readonly type: "string";
455
+ };
456
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
457
+ };
458
+ readonly subjectBinding: {
459
+ readonly type: "string";
460
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
461
+ };
462
+ };
463
+ };
464
+ };
465
+ };
466
+ };
467
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/epoch/prune/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAGhG;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;AAEvD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAErF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAE7C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,4DAAqE,CAAC;AAEvG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqF1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}