@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,408 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/rooms/storage/migrate/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, MigrationLastError, MigrationPauseCause, MigrationState, StorageConfigId } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Move a hosted room's existing blobs onto its assigned storage config: copy, verify against the manifest, switch, orphan the old copy. Orphaned blobs are not moved. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCRoomsStorageMigratePayload {
13
+ /**
14
+ * The room's identifier, as its owner minted it.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * Upper bound on the copy rate. The community applies its own lower bound when absent or larger.
19
+ */
20
+ maxBytesPerSecond?: number;
21
+ /**
22
+ * Why the administrator is making this change. Recorded with the change in the audit trail and shown to approvers. Attributed to its author on every surface and untrusted: it MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions.
23
+ */
24
+ reason: string;
25
+ ext?: Ext;
26
+ }
27
+ export interface VTCRoomsStorageMigrateResponsePayload {
28
+ /**
29
+ * Community-generated handle for this room's migration.
30
+ */
31
+ migrationId: string;
32
+ /**
33
+ * The room's identifier, as its owner minted it.
34
+ */
35
+ roomId: string;
36
+ /**
37
+ * The config this migration moves blobs to: the room's assigned config when the migration was approved. It does not change if the room is reassigned while the migration is under way.
38
+ */
39
+ toConfig: StorageConfigId;
40
+ /**
41
+ * @maxItems 64
42
+ */
43
+ fromConfigs: StorageConfigId[];
44
+ state: MigrationState;
45
+ totalFiles: number;
46
+ totalBytes: number;
47
+ doneFiles: number;
48
+ doneBytes: number;
49
+ /**
50
+ * Present exactly when `state` is `paused`.
51
+ */
52
+ pausedCause?: MigrationPauseCause;
53
+ /**
54
+ * Present when `state` is `paused`; MAY be present while `running`, when a step is being retried.
55
+ */
56
+ lastError?: MigrationLastError;
57
+ /**
58
+ * When the community will next try by itself. Present while a `running` migration waits out a backoff, and on a `paused` one the community will retry unprompted; absent on a `paused` one only re-issuing vtc/rooms/storage/migrate resumes (such as `capacity`).
59
+ */
60
+ nextAttemptAt?: string;
61
+ ext?: Ext;
62
+ }
63
+
64
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
65
+ export type { Ext, MigrationLastError, MigrationPauseCause, MigrationState, StorageConfigId };
66
+
67
+ /** Trust Task type URI. */
68
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/storage/migrate/0.2" as const;
69
+
70
+ /** Stable alias for this specification's request payload shape. */
71
+ export type Payload = VTCRoomsStorageMigratePayload;
72
+
73
+ /** Trust Task response type URI (request type URI + "#response"). */
74
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/storage/migrate/0.2#response" as const;
75
+
76
+ /** Stable alias for this specification's success-response payload shape. */
77
+ export type Response = VTCRoomsStorageMigrateResponsePayload;
78
+
79
+ /**
80
+ * This specification's payload schema, as a value.
81
+ *
82
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
83
+ * rather than only as a `.json` file because TypeScript types are erased
84
+ * at runtime: without a schema a consumer has nothing to validate, and
85
+ * every REQUIRED payload member is optional in practice. Cross-file
86
+ * `$ref`s are already inlined, so it needs no resolver.
87
+ */
88
+ export const PAYLOAD_SCHEMA = {
89
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
90
+ "$id": "https://trusttasks.org/spec/vtc/rooms/storage/migrate/0.2",
91
+ "title": "VTC Rooms — Storage — Migrate — payload",
92
+ "description": "Move a hosted room's existing blobs onto its assigned storage config: copy, verify against the manifest, switch, orphan the old copy. Orphaned blobs are not moved. The outer document members are owned by the framework — SPEC §6.3.",
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "required": [
96
+ "roomId",
97
+ "reason"
98
+ ],
99
+ "properties": {
100
+ "roomId": {
101
+ "type": "string",
102
+ "minLength": 1,
103
+ "maxLength": 512,
104
+ "description": "The room's identifier, as its owner minted it."
105
+ },
106
+ "maxBytesPerSecond": {
107
+ "type": "integer",
108
+ "minimum": 65536,
109
+ "description": "Upper bound on the copy rate. The community applies its own lower bound when absent or larger."
110
+ },
111
+ "reason": {
112
+ "type": "string",
113
+ "minLength": 1,
114
+ "maxLength": 500,
115
+ "description": "Why the administrator is making this change. Recorded with the change in the audit trail and shown to approvers. Attributed to its author on every surface and untrusted: it MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
116
+ },
117
+ "ext": {
118
+ "$ref": "#/$defs/Ext"
119
+ }
120
+ },
121
+ "$defs": {
122
+ "Response": {
123
+ "$anchor": "response",
124
+ "title": "VTC Rooms — Storage — Migrate — response payload",
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "migrationId",
129
+ "roomId",
130
+ "toConfig",
131
+ "fromConfigs",
132
+ "state",
133
+ "totalFiles",
134
+ "totalBytes",
135
+ "doneFiles",
136
+ "doneBytes"
137
+ ],
138
+ "properties": {
139
+ "migrationId": {
140
+ "type": "string",
141
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
142
+ "description": "Community-generated handle for this room's migration."
143
+ },
144
+ "roomId": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "maxLength": 512,
148
+ "description": "The room's identifier, as its owner minted it."
149
+ },
150
+ "toConfig": {
151
+ "$ref": "#/$defs/StorageConfigId",
152
+ "description": "The config this migration moves blobs to: the room's assigned config when the migration was approved. It does not change if the room is reassigned while the migration is under way."
153
+ },
154
+ "fromConfigs": {
155
+ "type": "array",
156
+ "maxItems": 64,
157
+ "items": {
158
+ "$ref": "#/$defs/StorageConfigId"
159
+ }
160
+ },
161
+ "state": {
162
+ "$ref": "#/$defs/MigrationState"
163
+ },
164
+ "totalFiles": {
165
+ "type": "integer",
166
+ "minimum": 0
167
+ },
168
+ "totalBytes": {
169
+ "type": "integer",
170
+ "minimum": 0
171
+ },
172
+ "doneFiles": {
173
+ "type": "integer",
174
+ "minimum": 0
175
+ },
176
+ "doneBytes": {
177
+ "type": "integer",
178
+ "minimum": 0
179
+ },
180
+ "pausedCause": {
181
+ "$ref": "#/$defs/MigrationPauseCause",
182
+ "description": "Present exactly when `state` is `paused`."
183
+ },
184
+ "lastError": {
185
+ "$ref": "#/$defs/MigrationLastError",
186
+ "description": "Present when `state` is `paused`; MAY be present while `running`, when a step is being retried."
187
+ },
188
+ "nextAttemptAt": {
189
+ "type": "string",
190
+ "format": "date-time",
191
+ "description": "When the community will next try by itself. Present while a `running` migration waits out a backoff, and on a `paused` one the community will retry unprompted; absent on a `paused` one only re-issuing vtc/rooms/storage/migrate resumes (such as `capacity`)."
192
+ },
193
+ "ext": {
194
+ "$ref": "#/$defs/Ext"
195
+ }
196
+ }
197
+ },
198
+ "Ext": {
199
+ "title": "Ext",
200
+ "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.",
201
+ "type": "object",
202
+ "minProperties": 1,
203
+ "additionalProperties": true,
204
+ "propertyNames": {
205
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
206
+ }
207
+ },
208
+ "MigrationLastError": {
209
+ "title": "MigrationLastError",
210
+ "type": "string",
211
+ "minLength": 1,
212
+ "maxLength": 500,
213
+ "description": "A one-line summary of the last failure, for an administrator: the step, the config and the backend's error code or status (`put to eu-s3-primary: 503 SlowDown`). Never a credential, a presigned URL, a signed request, a room identifier or anything derived from a room's contents."
214
+ },
215
+ "MigrationPauseCause": {
216
+ "title": "MigrationPauseCause",
217
+ "type": "string",
218
+ "enum": [
219
+ "capacity",
220
+ "source",
221
+ "destination",
222
+ "credential"
223
+ ],
224
+ "description": "Why a migration is `paused`. `capacity`: the destination config cannot hold the rest. `source`: a config the blobs are being moved off keeps failing to serve them. `destination`: the destination config keeps refusing writes, or is no longer `active`. `credential`: the community cannot obtain a credential for one of the configs."
225
+ },
226
+ "MigrationState": {
227
+ "title": "MigrationState",
228
+ "type": "string",
229
+ "enum": [
230
+ "queued",
231
+ "running",
232
+ "paused",
233
+ "complete",
234
+ "failed"
235
+ ],
236
+ "description": "`queued`: approved and waiting for another migration on this community to finish; nothing copied yet (a community that runs one migration at a time). `running`: copying, including while it retries a failing step with backoff. `paused`: halted after its automatic retries reached their cap without success, or on a cause that retrying cannot clear (`pausedCause`); resumed by issuing vtc/rooms/storage/migrate again, and by the community itself at `nextAttemptAt` when present. `complete`: every blob that was to move has moved. `failed`: halted on a blob whose copy did not verify against its manifest; that blob stays where it was."
237
+ },
238
+ "StorageConfigId": {
239
+ "title": "StorageConfigId",
240
+ "type": "string",
241
+ "minLength": 1,
242
+ "maxLength": 64,
243
+ "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
244
+ "description": "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value."
245
+ }
246
+ }
247
+ } as const;
248
+
249
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
250
+ export const RESPONSE_PAYLOAD_SCHEMA = {
251
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
252
+ "$ref": "#/$defs/Response",
253
+ "$defs": {
254
+ "Response": {
255
+ "$anchor": "response",
256
+ "title": "VTC Rooms — Storage — Migrate — response payload",
257
+ "type": "object",
258
+ "additionalProperties": false,
259
+ "required": [
260
+ "migrationId",
261
+ "roomId",
262
+ "toConfig",
263
+ "fromConfigs",
264
+ "state",
265
+ "totalFiles",
266
+ "totalBytes",
267
+ "doneFiles",
268
+ "doneBytes"
269
+ ],
270
+ "properties": {
271
+ "migrationId": {
272
+ "type": "string",
273
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
274
+ "description": "Community-generated handle for this room's migration."
275
+ },
276
+ "roomId": {
277
+ "type": "string",
278
+ "minLength": 1,
279
+ "maxLength": 512,
280
+ "description": "The room's identifier, as its owner minted it."
281
+ },
282
+ "toConfig": {
283
+ "$ref": "#/$defs/StorageConfigId",
284
+ "description": "The config this migration moves blobs to: the room's assigned config when the migration was approved. It does not change if the room is reassigned while the migration is under way."
285
+ },
286
+ "fromConfigs": {
287
+ "type": "array",
288
+ "maxItems": 64,
289
+ "items": {
290
+ "$ref": "#/$defs/StorageConfigId"
291
+ }
292
+ },
293
+ "state": {
294
+ "$ref": "#/$defs/MigrationState"
295
+ },
296
+ "totalFiles": {
297
+ "type": "integer",
298
+ "minimum": 0
299
+ },
300
+ "totalBytes": {
301
+ "type": "integer",
302
+ "minimum": 0
303
+ },
304
+ "doneFiles": {
305
+ "type": "integer",
306
+ "minimum": 0
307
+ },
308
+ "doneBytes": {
309
+ "type": "integer",
310
+ "minimum": 0
311
+ },
312
+ "pausedCause": {
313
+ "$ref": "#/$defs/MigrationPauseCause",
314
+ "description": "Present exactly when `state` is `paused`."
315
+ },
316
+ "lastError": {
317
+ "$ref": "#/$defs/MigrationLastError",
318
+ "description": "Present when `state` is `paused`; MAY be present while `running`, when a step is being retried."
319
+ },
320
+ "nextAttemptAt": {
321
+ "type": "string",
322
+ "format": "date-time",
323
+ "description": "When the community will next try by itself. Present while a `running` migration waits out a backoff, and on a `paused` one the community will retry unprompted; absent on a `paused` one only re-issuing vtc/rooms/storage/migrate resumes (such as `capacity`)."
324
+ },
325
+ "ext": {
326
+ "$ref": "#/$defs/Ext"
327
+ }
328
+ }
329
+ },
330
+ "Ext": {
331
+ "title": "Ext",
332
+ "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.",
333
+ "type": "object",
334
+ "minProperties": 1,
335
+ "additionalProperties": true,
336
+ "propertyNames": {
337
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
338
+ }
339
+ },
340
+ "MigrationLastError": {
341
+ "title": "MigrationLastError",
342
+ "type": "string",
343
+ "minLength": 1,
344
+ "maxLength": 500,
345
+ "description": "A one-line summary of the last failure, for an administrator: the step, the config and the backend's error code or status (`put to eu-s3-primary: 503 SlowDown`). Never a credential, a presigned URL, a signed request, a room identifier or anything derived from a room's contents."
346
+ },
347
+ "MigrationPauseCause": {
348
+ "title": "MigrationPauseCause",
349
+ "type": "string",
350
+ "enum": [
351
+ "capacity",
352
+ "source",
353
+ "destination",
354
+ "credential"
355
+ ],
356
+ "description": "Why a migration is `paused`. `capacity`: the destination config cannot hold the rest. `source`: a config the blobs are being moved off keeps failing to serve them. `destination`: the destination config keeps refusing writes, or is no longer `active`. `credential`: the community cannot obtain a credential for one of the configs."
357
+ },
358
+ "MigrationState": {
359
+ "title": "MigrationState",
360
+ "type": "string",
361
+ "enum": [
362
+ "queued",
363
+ "running",
364
+ "paused",
365
+ "complete",
366
+ "failed"
367
+ ],
368
+ "description": "`queued`: approved and waiting for another migration on this community to finish; nothing copied yet (a community that runs one migration at a time). `running`: copying, including while it retries a failing step with backoff. `paused`: halted after its automatic retries reached their cap without success, or on a cause that retrying cannot clear (`pausedCause`); resumed by issuing vtc/rooms/storage/migrate again, and by the community itself at `nextAttemptAt` when present. `complete`: every blob that was to move has moved. `failed`: halted on a blob whose copy did not verify against its manifest; that blob stays where it was."
369
+ },
370
+ "StorageConfigId": {
371
+ "title": "StorageConfigId",
372
+ "type": "string",
373
+ "minLength": 1,
374
+ "maxLength": 64,
375
+ "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
376
+ "description": "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value."
377
+ }
378
+ }
379
+ } as const;
380
+
381
+ /**
382
+ * SPEC.md §7.2 policy for the request variant, from this specification's
383
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
384
+ * per-specification and cannot be derived from the document alone, and
385
+ * item 2 needs the schema this carries.
386
+ */
387
+ export const SPEC = {
388
+ typeUri: TYPE_URI,
389
+ isBearer: false,
390
+ isProofRequired: true,
391
+ isRecipientRequired: true,
392
+ isIssuedAtRequired: true,
393
+ payloadSchema: PAYLOAD_SCHEMA,
394
+ } as const;
395
+
396
+ /**
397
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
398
+ * tracks the *issuer* party's requirement because a response swaps the
399
+ * parties (§7.3 item 5).
400
+ */
401
+ export const RESPONSE_SPEC = {
402
+ typeUri: RESPONSE_TYPE_URI,
403
+ isBearer: false,
404
+ isProofRequired: true,
405
+ isRecipientRequired: true,
406
+ isIssuedAtRequired: true,
407
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
408
+ } as const;
@@ -3,7 +3,7 @@
3
3
  * Source: specs/vtc/storage/configs/create/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { ConfigState, Ext, ExternalAccountContextId, ExternalAccountId, GcsSettings, LocalSettings, ObjectPrefix, S3Settings, StorageAuth, StorageConfig, StorageConfigId, StorageSettings, WalrusSettings } from "../../../../../_shared/components.js";
6
+ import type { ConfigState, Ext, ExternalAccountContextId, ExternalAccountId, GcsSettings, LocalSettings, ObjectPrefix, S3Settings, StorageAuth_VtcV0_1 as StorageAuth, StorageConfig_VtcV0_1 as StorageConfig, StorageConfigId, StorageSettings, WalrusSettings } from "../../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**