@openvtc/trust-tasks 0.22.6 → 0.22.7

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 (189) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/_shared/components.d.ts +434 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/acl/_shared/0.1/acl-entry.d.ts +1 -1
  5. package/dist/acl/_shared/0.1/acl-entry.d.ts.map +1 -1
  6. package/dist/acl/_shared/0.2/acl-entry.d.ts +22 -0
  7. package/dist/acl/_shared/0.2/acl-entry.d.ts.map +1 -0
  8. package/dist/acl/_shared/0.2/acl-entry.js +6 -0
  9. package/dist/acl/_shared/0.2/acl-entry.js.map +1 -0
  10. package/dist/acl/change-role/0.1/payload.d.ts +1 -1
  11. package/dist/acl/change-role/0.1/payload.d.ts.map +1 -1
  12. package/dist/acl/change-role/0.2/payload.d.ts +1679 -0
  13. package/dist/acl/change-role/0.2/payload.d.ts.map +1 -0
  14. package/dist/acl/change-role/0.2/payload.js +955 -0
  15. package/dist/acl/change-role/0.2/payload.js.map +1 -0
  16. package/dist/acl/grant/0.1/payload.d.ts +1 -1
  17. package/dist/acl/grant/0.1/payload.d.ts.map +1 -1
  18. package/dist/acl/grant/0.2/payload.d.ts +1649 -0
  19. package/dist/acl/grant/0.2/payload.d.ts.map +1 -0
  20. package/dist/acl/grant/0.2/payload.js +942 -0
  21. package/dist/acl/grant/0.2/payload.js.map +1 -0
  22. package/dist/acl/list/0.1/payload.d.ts +1 -1
  23. package/dist/acl/list/0.1/payload.d.ts.map +1 -1
  24. package/dist/acl/list/0.2/payload.d.ts +1853 -0
  25. package/dist/acl/list/0.2/payload.d.ts.map +1 -0
  26. package/dist/acl/list/0.2/payload.js +1041 -0
  27. package/dist/acl/list/0.2/payload.js.map +1 -0
  28. package/dist/acl/revoke/0.1/payload.d.ts +1 -1
  29. package/dist/acl/revoke/0.1/payload.d.ts.map +1 -1
  30. package/dist/acl/revoke/0.2/payload.d.ts +1844 -0
  31. package/dist/acl/revoke/0.2/payload.d.ts.map +1 -0
  32. package/dist/acl/revoke/0.2/payload.js +1052 -0
  33. package/dist/acl/revoke/0.2/payload.js.map +1 -0
  34. package/dist/acl/show/0.1/payload.d.ts +1 -1
  35. package/dist/acl/show/0.1/payload.d.ts.map +1 -1
  36. package/dist/acl/show/0.2/payload.d.ts +1689 -0
  37. package/dist/acl/show/0.2/payload.d.ts.map +1 -0
  38. package/dist/acl/show/0.2/payload.js +968 -0
  39. package/dist/acl/show/0.2/payload.js.map +1 -0
  40. package/dist/acl/swap-key/0.1/payload.d.ts +1 -1
  41. package/dist/acl/swap-key/0.1/payload.d.ts.map +1 -1
  42. package/dist/acl/update/0.1/payload.d.ts +1 -1
  43. package/dist/acl/update/0.1/payload.d.ts.map +1 -1
  44. package/dist/acl/update/0.2/payload.d.ts +1784 -0
  45. package/dist/acl/update/0.2/payload.d.ts.map +1 -0
  46. package/dist/acl/update/0.2/payload.js +1005 -0
  47. package/dist/acl/update/0.2/payload.js.map +1 -0
  48. package/dist/auth/step-up/approve-request/0.4/payload.d.ts +672 -0
  49. package/dist/auth/step-up/approve-request/0.4/payload.d.ts.map +1 -0
  50. package/dist/auth/step-up/approve-request/0.4/payload.js +373 -0
  51. package/dist/auth/step-up/approve-request/0.4/payload.js.map +1 -0
  52. package/dist/auth/step-up/approve-response/0.6/payload.d.ts +974 -0
  53. package/dist/auth/step-up/approve-response/0.6/payload.d.ts.map +1 -0
  54. package/dist/auth/step-up/approve-response/0.6/payload.js +552 -0
  55. package/dist/auth/step-up/approve-response/0.6/payload.js.map +1 -0
  56. package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts +16 -0
  57. package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts.map +1 -0
  58. package/dist/auth/step-up/approver/_shared/0.1/approver.js +6 -0
  59. package/dist/auth/step-up/approver/_shared/0.1/approver.js.map +1 -0
  60. package/dist/auth/step-up/approver/attest/0.1/payload.d.ts +174 -0
  61. package/dist/auth/step-up/approver/attest/0.1/payload.d.ts.map +1 -0
  62. package/dist/auth/step-up/approver/attest/0.1/payload.js +97 -0
  63. package/dist/auth/step-up/approver/attest/0.1/payload.js.map +1 -0
  64. package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts +503 -0
  65. package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts.map +1 -0
  66. package/dist/auth/step-up/approver/enroll/0.1/payload.js +285 -0
  67. package/dist/auth/step-up/approver/enroll/0.1/payload.js.map +1 -0
  68. package/dist/auth/step-up/approver/invite/0.1/payload.d.ts +375 -0
  69. package/dist/auth/step-up/approver/invite/0.1/payload.d.ts.map +1 -0
  70. package/dist/auth/step-up/approver/invite/0.1/payload.js +200 -0
  71. package/dist/auth/step-up/approver/invite/0.1/payload.js.map +1 -0
  72. package/dist/auth/step-up/approver/list/0.1/payload.d.ts +477 -0
  73. package/dist/auth/step-up/approver/list/0.1/payload.d.ts.map +1 -0
  74. package/dist/auth/step-up/approver/list/0.1/payload.js +272 -0
  75. package/dist/auth/step-up/approver/list/0.1/payload.js.map +1 -0
  76. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts +512 -0
  77. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts.map +1 -0
  78. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js +290 -0
  79. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js.map +1 -0
  80. package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts +343 -0
  81. package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts.map +1 -0
  82. package/dist/auth/step-up/approver/redeem/start/0.1/payload.js +187 -0
  83. package/dist/auth/step-up/approver/redeem/start/0.1/payload.js.map +1 -0
  84. package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts +534 -0
  85. package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts.map +1 -0
  86. package/dist/auth/step-up/approver/revoke/0.1/payload.js +301 -0
  87. package/dist/auth/step-up/approver/revoke/0.1/payload.js.map +1 -0
  88. package/dist/index.d.ts +31 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +31 -0
  91. package/dist/index.js.map +1 -1
  92. package/dist/task-consent/decision/0.2/payload.d.ts +775 -0
  93. package/dist/task-consent/decision/0.2/payload.d.ts.map +1 -0
  94. package/dist/task-consent/decision/0.2/payload.js +450 -0
  95. package/dist/task-consent/decision/0.2/payload.js.map +1 -0
  96. package/dist/vtc/admin/actions/_shared/0.1/action.d.ts +24 -0
  97. package/dist/vtc/admin/actions/_shared/0.1/action.d.ts.map +1 -0
  98. package/dist/vtc/admin/actions/_shared/0.1/action.js +6 -0
  99. package/dist/vtc/admin/actions/_shared/0.1/action.js.map +1 -0
  100. package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts +1012 -0
  101. package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts.map +1 -0
  102. package/dist/vtc/admin/actions/acknowledge/0.1/payload.js +636 -0
  103. package/dist/vtc/admin/actions/acknowledge/0.1/payload.js.map +1 -0
  104. package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts +1026 -0
  105. package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts.map +1 -0
  106. package/dist/vtc/admin/actions/cancel/0.1/payload.js +641 -0
  107. package/dist/vtc/admin/actions/cancel/0.1/payload.js.map +1 -0
  108. package/dist/vtc/admin/actions/list/0.1/payload.d.ts +1200 -0
  109. package/dist/vtc/admin/actions/list/0.1/payload.d.ts.map +1 -0
  110. package/dist/vtc/admin/actions/list/0.1/payload.js +726 -0
  111. package/dist/vtc/admin/actions/list/0.1/payload.js.map +1 -0
  112. package/dist/vtc/admin/actions/show/0.1/payload.d.ts +1012 -0
  113. package/dist/vtc/admin/actions/show/0.1/payload.d.ts.map +1 -0
  114. package/dist/vtc/admin/actions/show/0.1/payload.js +636 -0
  115. package/dist/vtc/admin/actions/show/0.1/payload.js.map +1 -0
  116. package/dist/vtc/install/claim/finish/0.3/payload.d.ts +379 -0
  117. package/dist/vtc/install/claim/finish/0.3/payload.d.ts.map +1 -0
  118. package/dist/vtc/install/claim/finish/0.3/payload.js +205 -0
  119. package/dist/vtc/install/claim/finish/0.3/payload.js.map +1 -0
  120. package/dist/vtc/install/claim/start/0.3/payload.d.ts +368 -0
  121. package/dist/vtc/install/claim/start/0.3/payload.d.ts.map +1 -0
  122. package/dist/vtc/install/claim/start/0.3/payload.js +201 -0
  123. package/dist/vtc/install/claim/start/0.3/payload.js.map +1 -0
  124. package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts +208 -0
  125. package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts.map +1 -0
  126. package/dist/vtc/members/authority-reduced-notice/0.1/payload.js +112 -0
  127. package/dist/vtc/members/authority-reduced-notice/0.1/payload.js.map +1 -0
  128. package/dist/vtc/roles/_shared/0.1/role.d.ts +16 -0
  129. package/dist/vtc/roles/_shared/0.1/role.d.ts.map +1 -0
  130. package/dist/vtc/roles/_shared/0.1/role.js +6 -0
  131. package/dist/vtc/roles/_shared/0.1/role.js.map +1 -0
  132. package/dist/vtc/roles/define/0.1/payload.d.ts +703 -0
  133. package/dist/vtc/roles/define/0.1/payload.d.ts.map +1 -0
  134. package/dist/vtc/roles/define/0.1/payload.js +371 -0
  135. package/dist/vtc/roles/define/0.1/payload.js.map +1 -0
  136. package/dist/vtc/roles/delete/0.1/payload.d.ts +281 -0
  137. package/dist/vtc/roles/delete/0.1/payload.d.ts.map +1 -0
  138. package/dist/vtc/roles/delete/0.1/payload.js +152 -0
  139. package/dist/vtc/roles/delete/0.1/payload.js.map +1 -0
  140. package/dist/vtc/roles/list/0.1/payload.d.ts +639 -0
  141. package/dist/vtc/roles/list/0.1/payload.d.ts.map +1 -0
  142. package/dist/vtc/roles/list/0.1/payload.js +345 -0
  143. package/dist/vtc/roles/list/0.1/payload.js.map +1 -0
  144. package/dist/vtc/roles/show/0.1/payload.d.ts +651 -0
  145. package/dist/vtc/roles/show/0.1/payload.d.ts.map +1 -0
  146. package/dist/vtc/roles/show/0.1/payload.js +351 -0
  147. package/dist/vtc/roles/show/0.1/payload.js.map +1 -0
  148. package/package.json +1 -1
  149. package/src/_shared/components.ts +440 -1
  150. package/src/acl/_shared/0.1/acl-entry.ts +1 -1
  151. package/src/acl/_shared/0.2/acl-entry.ts +23 -0
  152. package/src/acl/change-role/0.1/payload.ts +1 -1
  153. package/src/acl/change-role/0.2/payload.ts +1011 -0
  154. package/src/acl/grant/0.1/payload.ts +1 -1
  155. package/src/acl/grant/0.2/payload.ts +990 -0
  156. package/src/acl/list/0.1/payload.ts +1 -1
  157. package/src/acl/list/0.2/payload.ts +1125 -0
  158. package/src/acl/revoke/0.1/payload.ts +1 -1
  159. package/src/acl/revoke/0.2/payload.ts +1122 -0
  160. package/src/acl/show/0.1/payload.ts +1 -1
  161. package/src/acl/show/0.2/payload.ts +1016 -0
  162. package/src/acl/swap-key/0.1/payload.ts +1 -1
  163. package/src/acl/update/0.1/payload.ts +1 -1
  164. package/src/acl/update/0.2/payload.ts +1094 -0
  165. package/src/auth/step-up/approve-request/0.4/payload.ts +461 -0
  166. package/src/auth/step-up/approve-response/0.6/payload.ts +648 -0
  167. package/src/auth/step-up/approver/_shared/0.1/approver.ts +17 -0
  168. package/src/auth/step-up/approver/attest/0.1/payload.ts +135 -0
  169. package/src/auth/step-up/approver/enroll/0.1/payload.ts +329 -0
  170. package/src/auth/step-up/approver/invite/0.1/payload.ts +258 -0
  171. package/src/auth/step-up/approver/list/0.1/payload.ts +318 -0
  172. package/src/auth/step-up/approver/redeem/finish/0.1/payload.ts +337 -0
  173. package/src/auth/step-up/approver/redeem/start/0.1/payload.ts +241 -0
  174. package/src/auth/step-up/approver/revoke/0.1/payload.ts +352 -0
  175. package/src/index.ts +31 -0
  176. package/src/task-consent/decision/0.2/payload.ts +537 -0
  177. package/src/vtc/admin/actions/_shared/0.1/action.ts +25 -0
  178. package/src/vtc/admin/actions/acknowledge/0.1/payload.ts +671 -0
  179. package/src/vtc/admin/actions/cancel/0.1/payload.ts +680 -0
  180. package/src/vtc/admin/actions/list/0.1/payload.ts +795 -0
  181. package/src/vtc/admin/actions/show/0.1/payload.ts +671 -0
  182. package/src/vtc/install/claim/finish/0.3/payload.ts +253 -0
  183. package/src/vtc/install/claim/start/0.3/payload.ts +256 -0
  184. package/src/vtc/members/authority-reduced-notice/0.1/payload.ts +162 -0
  185. package/src/vtc/roles/_shared/0.1/role.ts +17 -0
  186. package/src/vtc/roles/define/0.1/payload.ts +435 -0
  187. package/src/vtc/roles/delete/0.1/payload.ts +200 -0
  188. package/src/vtc/roles/list/0.1/payload.ts +389 -0
  189. package/src/vtc/roles/show/0.1/payload.ts +399 -0
@@ -0,0 +1,389 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/roles/list/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Capability_AclV0_2 as Capability, CapabilityRef, Ext, ResourceQualifier, RoleDefinition, RoleName } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Enumerate the administrative roles a VTC holds — built-in and custom. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCRolesListPayload {
13
+ /**
14
+ * `true` (the default) returns built-in and custom roles; `false` returns custom roles only.
15
+ */
16
+ includeBuiltIn?: boolean;
17
+ /**
18
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
19
+ */
20
+ ext?: Ext;
21
+ }
22
+ /**
23
+ * The success response to a vtc/roles/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/list/0.1#response.
24
+ */
25
+ export interface VTCRolesListResponsePayload {
26
+ /**
27
+ * Every role matching the request, each with its full ceiling and approve ceiling. Complete — not paged: a community's role vocabulary is small and bounded.
28
+ */
29
+ roles: RoleDefinition[];
30
+ /**
31
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
32
+ */
33
+ ext?: Ext;
34
+ }
35
+
36
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
37
+ export type { Capability, CapabilityRef, Ext, ResourceQualifier, RoleDefinition, RoleName };
38
+
39
+ /** Trust Task type URI. */
40
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/roles/list/0.1" as const;
41
+
42
+ /** Stable alias for this specification's request payload shape. */
43
+ export type Payload = VTCRolesListPayload;
44
+
45
+ /** Trust Task response type URI (request type URI + "#response"). */
46
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/roles/list/0.1#response" as const;
47
+
48
+ /** Stable alias for this specification's success-response payload shape. */
49
+ export type Response = VTCRolesListResponsePayload;
50
+
51
+ /**
52
+ * This specification's payload schema, as a value.
53
+ *
54
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
55
+ * rather than only as a `.json` file because TypeScript types are erased
56
+ * at runtime: without a schema a consumer has nothing to validate, and
57
+ * every REQUIRED payload member is optional in practice. Cross-file
58
+ * `$ref`s are already inlined, so it needs no resolver.
59
+ */
60
+ export const PAYLOAD_SCHEMA = {
61
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
62
+ "$id": "https://trusttasks.org/spec/vtc/roles/list/0.1",
63
+ "title": "VTC Roles — List — payload",
64
+ "description": "Enumerate the administrative roles a VTC holds — built-in and custom. The outer document members are owned by the framework — SPEC §6.3.",
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "includeBuiltIn": {
69
+ "type": "boolean",
70
+ "default": true,
71
+ "description": "`true` (the default) returns built-in and custom roles; `false` returns custom roles only."
72
+ },
73
+ "ext": {
74
+ "$ref": "#/$defs/Ext",
75
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
76
+ }
77
+ },
78
+ "$defs": {
79
+ "Response": {
80
+ "$anchor": "response",
81
+ "title": "VTC Roles — List — response payload",
82
+ "description": "The success response to a vtc/roles/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/list/0.1#response.",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "roles"
87
+ ],
88
+ "properties": {
89
+ "roles": {
90
+ "type": "array",
91
+ "items": {
92
+ "$ref": "#/$defs/RoleDefinition"
93
+ },
94
+ "description": "Every role matching the request, each with its full ceiling and approve ceiling. Complete — not paged: a community's role vocabulary is small and bounded."
95
+ },
96
+ "ext": {
97
+ "$ref": "#/$defs/Ext",
98
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
99
+ }
100
+ }
101
+ },
102
+ "Ext": {
103
+ "title": "Ext",
104
+ "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.",
105
+ "type": "object",
106
+ "minProperties": 1,
107
+ "additionalProperties": true,
108
+ "propertyNames": {
109
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
110
+ }
111
+ },
112
+ "RoleDefinition": {
113
+ "title": "RoleDefinition",
114
+ "description": "One administrative role of a VTC: a name, the CEILING of capabilities an entry holding the role may hold, and the approve ceiling of capabilities it may approve.\n\nA ROLE IS A CEILING, NOT A GRANT. It states the most an entry with this role could be allowed; the entry's own `capabilities` say what it does hold, and may be narrower. An entry's effective capabilities are this whole `ceiling` where the entry states `capabilities: {scope: ceiling}`, nothing where it states `none`, and this `ceiling` ∩ its listed grants (plus any additive grant) where it states `listed`. Holding the role confers nothing an entry has not been granted. Likewise `approveScope` bounds what an entry may approve: the entry's `approveCapabilities` select from it (`ceiling` = all of it, `listed` = an intersection, absent or `none` = nothing), and the entry's `approve` scope must not be none for any of it to apply.\n\nNO WILDCARDS. A ceiling lists its capabilities explicitly, even where it is meant to be \"everything\"; a role whose ceiling is empty holds no capability, and one whose approve ceiling is empty approves none. Built-in roles whose intent is the whole registry enumerate it, and their records grow when the registry grows — by release, never by policy.\n\nBUILT-IN ROLES (`builtIn: true`) are fixed by the VTC implementation and MUST NOT be changed or deleted through vtc/roles/define or vtc/roles/delete. The built-in set, with the ceilings a VTC is expected to ship (descriptive; the authoritative ceiling is the record the VTC returns):\n- `community-admin` — ceiling: every `vtc.*` capability and `git.ns.admin` unqualified; approve ceiling: every capability. With its full ceiling it is the community's unrestricted administrator.\n- `moderator` — ceiling: `vtc.members.manage`, `vtc.join.decide`, `vtc.invitations.manage`; approve ceiling: the same.\n- `vetting-lead` — ceiling: `vtc.vetting.manage` (an entry may qualify it by criterion); approve ceiling: `vtc.vetting.manage`, so vetting leads approve vetter grants and other vetting leads at their qualifier.\n- `repo-manager` — ceiling: `git.repo.manage` and `git.ns.admin` (held qualified by namespace or repository); approve ceiling: the same, at the same qualifier.\n- `credential-officer` — ceiling: `vtc.credentials.issue`, `vtc.credentials.revoke`; approve ceiling: the same.\n- `auditor` — ceiling: `vtc.audit.read`; approve ceiling: none.\n- `approver` — ceiling: none (an entry holding it states `act: {scope: none}`); approve ceiling: every capability, narrowed by the entry's `approveCapabilities` — the least-privilege approver.\n\nCUSTOM ROLES (`builtIn: false`) are created, changed and deleted by a community through vtc/roles/define and vtc/roles/delete. A VTC implementing this family takes those changes only through an N-of-M approval among its administrators, never through policy (Rego or otherwise) — authority-defining records are host-enforced, and policy may only refuse. That is a description of the VTC's model, not a requirement this schema can carry. An entry holds at most one administrative role; a combination (repo manager AND vetting lead) is expressed as a custom role.",
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": [
118
+ "name",
119
+ "builtIn",
120
+ "ceiling",
121
+ "approveScope"
122
+ ],
123
+ "properties": {
124
+ "name": {
125
+ "$ref": "#/$defs/RoleName"
126
+ },
127
+ "builtIn": {
128
+ "type": "boolean",
129
+ "description": "`true` for a role fixed by the VTC implementation, which cannot be changed or deleted; `false` for a community-defined custom role."
130
+ },
131
+ "description": {
132
+ "type": "string",
133
+ "maxLength": 512,
134
+ "description": "Optional human-readable description. Confers nothing."
135
+ },
136
+ "ceiling": {
137
+ "type": "array",
138
+ "items": {
139
+ "$ref": "#/$defs/CapabilityRef"
140
+ },
141
+ "description": "The capabilities an entry holding this role MAY hold, each optionally qualified by a resource. An entry may hold a capability at a qualifier inside the ceiling's (a ceiling of `git.repo.manage` unqualified admits `git.repo.manage @ git-ns:github.com/acme`), never outside it. EMPTY means the role admits no capability. A capability the VTC classes as additive never appears in a ceiling — an additive capability is by definition one no role implies."
142
+ },
143
+ "approveScope": {
144
+ "type": "array",
145
+ "items": {
146
+ "$ref": "#/$defs/CapabilityRef"
147
+ },
148
+ "description": "The capabilities an entry holding this role MAY approve an action needing — the role's approve ceiling, independent of `ceiling`. An entry approves all of it with `approveCapabilities: {scope: ceiling}`, an intersection with `listed`, and nothing when `approveCapabilities` is absent or `none`; the entry's `approve` scope must be other than none for any of it to apply. EMPTY means the role approves nothing."
149
+ },
150
+ "createdAt": {
151
+ "type": "string",
152
+ "format": "date-time"
153
+ },
154
+ "createdBy": {
155
+ "type": "string",
156
+ "minLength": 1,
157
+ "maxLength": 2048,
158
+ "description": "VID of the administrator whose request created the role (for a custom role created by approval, the requester). Absent on a built-in role."
159
+ },
160
+ "updatedAt": {
161
+ "type": "string",
162
+ "format": "date-time"
163
+ },
164
+ "updatedBy": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "maxLength": 2048,
168
+ "description": "VID of the administrator whose request last replaced the role. Absent on a built-in role and on a custom role never replaced."
169
+ },
170
+ "ext": {
171
+ "$ref": "#/$defs/Ext",
172
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT be interpreted as widening a ceiling."
173
+ }
174
+ }
175
+ },
176
+ "RoleName": {
177
+ "title": "RoleName",
178
+ "description": "A role identifier: lowercase, hyphen-separated, at most 64 characters. Compared by exact string equality. It is the value an AclEntry 0.2 carries in `role`.",
179
+ "type": "string",
180
+ "pattern": "^[a-z][a-z0-9-]{0,63}$"
181
+ },
182
+ "CapabilityRef": {
183
+ "title": "CapabilityRef",
184
+ "description": "A capability, optionally qualified by a resource. Used where a capability is named but not granted — a role's ceiling, a role's approve ceiling, an entry's approvable capabilities. An unqualified reference covers every resource of the capability's kind.",
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "required": [
188
+ "capability"
189
+ ],
190
+ "properties": {
191
+ "capability": {
192
+ "$ref": "#/$defs/Capability"
193
+ },
194
+ "resource": {
195
+ "$ref": "#/$defs/ResourceQualifier",
196
+ "description": "Optional qualifier. Absent covers every resource of the capability's kind."
197
+ }
198
+ }
199
+ },
200
+ "ResourceQualifier": {
201
+ "title": "ResourceQualifier",
202
+ "description": "Opaque qualifier naming the part of the maintainer's resources a capability applies to (e.g. `git-ns:github.com/acme`, `git-repo:github.com/acme/r#4211`, `policy:join`). Its grammar and containment rule are the maintainer's: a qualified capability covers the named resource and the resources inside it. A qualifier MUST NOT be read as widening the entry's act scope.",
203
+ "type": "string",
204
+ "minLength": 1,
205
+ "maxLength": 512
206
+ },
207
+ "Capability": {
208
+ "title": "Capability",
209
+ "description": "Opaque identifier of one administrative power in the maintainer's capability registry — lowercase dot-separated segments (e.g. `keys.sign`, `vtc.roles.assign`, `git.repo.manage`). A consumer MUST NOT treat a capability it does not recognise as granted.",
210
+ "type": "string",
211
+ "minLength": 1,
212
+ "maxLength": 128,
213
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)*$"
214
+ }
215
+ }
216
+ } as const;
217
+
218
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
219
+ export const RESPONSE_PAYLOAD_SCHEMA = {
220
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
221
+ "$ref": "#/$defs/Response",
222
+ "$defs": {
223
+ "Response": {
224
+ "$anchor": "response",
225
+ "title": "VTC Roles — List — response payload",
226
+ "description": "The success response to a vtc/roles/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/list/0.1#response.",
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "roles"
231
+ ],
232
+ "properties": {
233
+ "roles": {
234
+ "type": "array",
235
+ "items": {
236
+ "$ref": "#/$defs/RoleDefinition"
237
+ },
238
+ "description": "Every role matching the request, each with its full ceiling and approve ceiling. Complete — not paged: a community's role vocabulary is small and bounded."
239
+ },
240
+ "ext": {
241
+ "$ref": "#/$defs/Ext",
242
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
243
+ }
244
+ }
245
+ },
246
+ "Ext": {
247
+ "title": "Ext",
248
+ "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.",
249
+ "type": "object",
250
+ "minProperties": 1,
251
+ "additionalProperties": true,
252
+ "propertyNames": {
253
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
254
+ }
255
+ },
256
+ "RoleDefinition": {
257
+ "title": "RoleDefinition",
258
+ "description": "One administrative role of a VTC: a name, the CEILING of capabilities an entry holding the role may hold, and the approve ceiling of capabilities it may approve.\n\nA ROLE IS A CEILING, NOT A GRANT. It states the most an entry with this role could be allowed; the entry's own `capabilities` say what it does hold, and may be narrower. An entry's effective capabilities are this whole `ceiling` where the entry states `capabilities: {scope: ceiling}`, nothing where it states `none`, and this `ceiling` ∩ its listed grants (plus any additive grant) where it states `listed`. Holding the role confers nothing an entry has not been granted. Likewise `approveScope` bounds what an entry may approve: the entry's `approveCapabilities` select from it (`ceiling` = all of it, `listed` = an intersection, absent or `none` = nothing), and the entry's `approve` scope must not be none for any of it to apply.\n\nNO WILDCARDS. A ceiling lists its capabilities explicitly, even where it is meant to be \"everything\"; a role whose ceiling is empty holds no capability, and one whose approve ceiling is empty approves none. Built-in roles whose intent is the whole registry enumerate it, and their records grow when the registry grows — by release, never by policy.\n\nBUILT-IN ROLES (`builtIn: true`) are fixed by the VTC implementation and MUST NOT be changed or deleted through vtc/roles/define or vtc/roles/delete. The built-in set, with the ceilings a VTC is expected to ship (descriptive; the authoritative ceiling is the record the VTC returns):\n- `community-admin` — ceiling: every `vtc.*` capability and `git.ns.admin` unqualified; approve ceiling: every capability. With its full ceiling it is the community's unrestricted administrator.\n- `moderator` — ceiling: `vtc.members.manage`, `vtc.join.decide`, `vtc.invitations.manage`; approve ceiling: the same.\n- `vetting-lead` — ceiling: `vtc.vetting.manage` (an entry may qualify it by criterion); approve ceiling: `vtc.vetting.manage`, so vetting leads approve vetter grants and other vetting leads at their qualifier.\n- `repo-manager` — ceiling: `git.repo.manage` and `git.ns.admin` (held qualified by namespace or repository); approve ceiling: the same, at the same qualifier.\n- `credential-officer` — ceiling: `vtc.credentials.issue`, `vtc.credentials.revoke`; approve ceiling: the same.\n- `auditor` — ceiling: `vtc.audit.read`; approve ceiling: none.\n- `approver` — ceiling: none (an entry holding it states `act: {scope: none}`); approve ceiling: every capability, narrowed by the entry's `approveCapabilities` — the least-privilege approver.\n\nCUSTOM ROLES (`builtIn: false`) are created, changed and deleted by a community through vtc/roles/define and vtc/roles/delete. A VTC implementing this family takes those changes only through an N-of-M approval among its administrators, never through policy (Rego or otherwise) — authority-defining records are host-enforced, and policy may only refuse. That is a description of the VTC's model, not a requirement this schema can carry. An entry holds at most one administrative role; a combination (repo manager AND vetting lead) is expressed as a custom role.",
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "required": [
262
+ "name",
263
+ "builtIn",
264
+ "ceiling",
265
+ "approveScope"
266
+ ],
267
+ "properties": {
268
+ "name": {
269
+ "$ref": "#/$defs/RoleName"
270
+ },
271
+ "builtIn": {
272
+ "type": "boolean",
273
+ "description": "`true` for a role fixed by the VTC implementation, which cannot be changed or deleted; `false` for a community-defined custom role."
274
+ },
275
+ "description": {
276
+ "type": "string",
277
+ "maxLength": 512,
278
+ "description": "Optional human-readable description. Confers nothing."
279
+ },
280
+ "ceiling": {
281
+ "type": "array",
282
+ "items": {
283
+ "$ref": "#/$defs/CapabilityRef"
284
+ },
285
+ "description": "The capabilities an entry holding this role MAY hold, each optionally qualified by a resource. An entry may hold a capability at a qualifier inside the ceiling's (a ceiling of `git.repo.manage` unqualified admits `git.repo.manage @ git-ns:github.com/acme`), never outside it. EMPTY means the role admits no capability. A capability the VTC classes as additive never appears in a ceiling — an additive capability is by definition one no role implies."
286
+ },
287
+ "approveScope": {
288
+ "type": "array",
289
+ "items": {
290
+ "$ref": "#/$defs/CapabilityRef"
291
+ },
292
+ "description": "The capabilities an entry holding this role MAY approve an action needing — the role's approve ceiling, independent of `ceiling`. An entry approves all of it with `approveCapabilities: {scope: ceiling}`, an intersection with `listed`, and nothing when `approveCapabilities` is absent or `none`; the entry's `approve` scope must be other than none for any of it to apply. EMPTY means the role approves nothing."
293
+ },
294
+ "createdAt": {
295
+ "type": "string",
296
+ "format": "date-time"
297
+ },
298
+ "createdBy": {
299
+ "type": "string",
300
+ "minLength": 1,
301
+ "maxLength": 2048,
302
+ "description": "VID of the administrator whose request created the role (for a custom role created by approval, the requester). Absent on a built-in role."
303
+ },
304
+ "updatedAt": {
305
+ "type": "string",
306
+ "format": "date-time"
307
+ },
308
+ "updatedBy": {
309
+ "type": "string",
310
+ "minLength": 1,
311
+ "maxLength": 2048,
312
+ "description": "VID of the administrator whose request last replaced the role. Absent on a built-in role and on a custom role never replaced."
313
+ },
314
+ "ext": {
315
+ "$ref": "#/$defs/Ext",
316
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT be interpreted as widening a ceiling."
317
+ }
318
+ }
319
+ },
320
+ "RoleName": {
321
+ "title": "RoleName",
322
+ "description": "A role identifier: lowercase, hyphen-separated, at most 64 characters. Compared by exact string equality. It is the value an AclEntry 0.2 carries in `role`.",
323
+ "type": "string",
324
+ "pattern": "^[a-z][a-z0-9-]{0,63}$"
325
+ },
326
+ "CapabilityRef": {
327
+ "title": "CapabilityRef",
328
+ "description": "A capability, optionally qualified by a resource. Used where a capability is named but not granted — a role's ceiling, a role's approve ceiling, an entry's approvable capabilities. An unqualified reference covers every resource of the capability's kind.",
329
+ "type": "object",
330
+ "additionalProperties": false,
331
+ "required": [
332
+ "capability"
333
+ ],
334
+ "properties": {
335
+ "capability": {
336
+ "$ref": "#/$defs/Capability"
337
+ },
338
+ "resource": {
339
+ "$ref": "#/$defs/ResourceQualifier",
340
+ "description": "Optional qualifier. Absent covers every resource of the capability's kind."
341
+ }
342
+ }
343
+ },
344
+ "ResourceQualifier": {
345
+ "title": "ResourceQualifier",
346
+ "description": "Opaque qualifier naming the part of the maintainer's resources a capability applies to (e.g. `git-ns:github.com/acme`, `git-repo:github.com/acme/r#4211`, `policy:join`). Its grammar and containment rule are the maintainer's: a qualified capability covers the named resource and the resources inside it. A qualifier MUST NOT be read as widening the entry's act scope.",
347
+ "type": "string",
348
+ "minLength": 1,
349
+ "maxLength": 512
350
+ },
351
+ "Capability": {
352
+ "title": "Capability",
353
+ "description": "Opaque identifier of one administrative power in the maintainer's capability registry — lowercase dot-separated segments (e.g. `keys.sign`, `vtc.roles.assign`, `git.repo.manage`). A consumer MUST NOT treat a capability it does not recognise as granted.",
354
+ "type": "string",
355
+ "minLength": 1,
356
+ "maxLength": 128,
357
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)*$"
358
+ }
359
+ }
360
+ } as const;
361
+
362
+ /**
363
+ * SPEC.md §7.2 policy for the request variant, from this specification's
364
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
365
+ * per-specification and cannot be derived from the document alone, and
366
+ * item 2 needs the schema this carries.
367
+ */
368
+ export const SPEC = {
369
+ typeUri: TYPE_URI,
370
+ isBearer: false,
371
+ isProofRequired: false,
372
+ isRecipientRequired: true,
373
+ isIssuedAtRequired: false,
374
+ payloadSchema: PAYLOAD_SCHEMA,
375
+ } as const;
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 const RESPONSE_SPEC = {
383
+ typeUri: RESPONSE_TYPE_URI,
384
+ isBearer: false,
385
+ isProofRequired: false,
386
+ isRecipientRequired: true,
387
+ isIssuedAtRequired: false,
388
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
389
+ } as const;