@astrale-domains/shell 0.1.5 → 0.1.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 (301) hide show
  1. package/README.md +73 -173
  2. package/dist/domain.d.ts +477 -31
  3. package/dist/domain.js +87 -78
  4. package/dist/functions/application/index.js +2 -1
  5. package/dist/functions/application/legacy/index.js +1 -0
  6. package/dist/functions/application/legacy/list-entrypoints.js +8 -0
  7. package/dist/functions/authority/capabilities.js +1 -0
  8. package/dist/functions/authority/composition.js +47 -0
  9. package/dist/functions/authority/index.js +2 -0
  10. package/dist/functions/authority/roles.js +98 -0
  11. package/dist/functions/directory/disconnect-directory.js +35 -0
  12. package/dist/functions/directory/index.js +1 -0
  13. package/dist/functions/group/change-group-membership.js +43 -9
  14. package/dist/functions/group/create-group.js +23 -0
  15. package/dist/functions/group/delete-group.js +33 -0
  16. package/dist/functions/group/deprovision-group.js +27 -0
  17. package/dist/functions/group/group-errors.js +43 -0
  18. package/dist/functions/group/group-membership-errors.js +2 -0
  19. package/dist/functions/group/group.js +51 -0
  20. package/dist/functions/group/index.js +8 -2
  21. package/dist/functions/group/legacy/index.js +1 -0
  22. package/dist/functions/group/legacy/membership.js +60 -0
  23. package/dist/functions/group/membership-laws.js +40 -0
  24. package/dist/functions/group/provision-group.js +33 -0
  25. package/dist/functions/group/update-group.js +55 -0
  26. package/dist/functions/invitation/index.js +2 -0
  27. package/dist/functions/invitation/invitation-errors.js +13 -0
  28. package/dist/functions/invitation/invitation-methods.js +41 -0
  29. package/dist/functions/invitation/send-invitation.js +81 -0
  30. package/dist/functions/user/account.js +35 -0
  31. package/dist/functions/user/create-user.js +45 -0
  32. package/dist/functions/user/deactivate-user.js +19 -0
  33. package/dist/functions/user/delete-user.js +34 -0
  34. package/dist/functions/user/deprovision-user.js +21 -0
  35. package/dist/functions/user/index.js +15 -1
  36. package/dist/functions/user/invite-errors.js +18 -0
  37. package/dist/functions/user/invite-user.js +42 -34
  38. package/dist/functions/user/legacy/claimed-account.js +11 -0
  39. package/dist/functions/user/legacy/index.js +4 -0
  40. package/dist/functions/user/legacy/invite.js +20 -0
  41. package/dist/functions/user/legacy/migrate-accounts.js +98 -0
  42. package/dist/functions/user/legacy/record-profile.js +19 -0
  43. package/dist/functions/user/protect-administrators.js +16 -0
  44. package/dist/functions/user/provision-user.js +70 -0
  45. package/dist/functions/user/reactivate-user.js +19 -0
  46. package/dist/functions/user/read-account.js +12 -0
  47. package/dist/functions/user/request-invitation.js +17 -0
  48. package/dist/functions/user/update-profile.js +22 -0
  49. package/dist/functions/user/update-user.js +68 -0
  50. package/dist/functions/user/user-errors.js +69 -0
  51. package/dist/functions/user/write-account.js +57 -0
  52. package/dist/functions/view-access/index.js +2 -1
  53. package/dist/functions/view-access/{assign-views.js → legacy/assign-views.js} +11 -7
  54. package/dist/functions/view-access/legacy/index.js +1 -0
  55. package/dist/functions/view-access/{view-access-errors.js → legacy/view-access-errors.js} +5 -1
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.js +3 -1
  58. package/dist/integrations/user-invitation/invite-user-request.d.ts +6 -0
  59. package/dist/legacy/index.js +1 -0
  60. package/dist/legacy/release.js +33 -0
  61. package/dist/mutations/composition/grant-role.js +13 -0
  62. package/dist/mutations/composition/index.js +1 -0
  63. package/dist/mutations/group/legacy/index.js +1 -0
  64. package/dist/mutations/group/legacy/membership-class.js +7 -0
  65. package/dist/mutations/group/set-group-membership.js +23 -14
  66. package/dist/mutations/identity/create-profile.js +37 -0
  67. package/dist/mutations/identity/delete-identity.js +28 -0
  68. package/dist/mutations/identity/index.js +4 -0
  69. package/dist/mutations/identity/write-account.js +109 -0
  70. package/dist/mutations/identity/write-group.js +72 -0
  71. package/dist/mutations/invitation/index.js +1 -0
  72. package/dist/mutations/invitation/write-invitation.js +62 -0
  73. package/dist/mutations/user/legacy/index.js +1 -0
  74. package/dist/mutations/user/{record-user-profile.js → legacy/record-user-profile.js} +5 -2
  75. package/dist/providers/admin-enrollment/create-admin-enrollment-provider.js +6 -3
  76. package/dist/providers/admin-enrollment/legacy/index.js +1 -0
  77. package/dist/providers/admin-enrollment/legacy/send-without-profile.js +16 -0
  78. package/dist/queries/application/legacy/index.js +1 -0
  79. package/dist/queries/application/legacy/read-installed-entrypoints.js +47 -0
  80. package/dist/queries/composition/index.js +2 -0
  81. package/dist/queries/composition/read-extensions.js +34 -0
  82. package/dist/queries/composition/read-role-nodes.js +41 -0
  83. package/dist/queries/group/index.js +1 -1
  84. package/dist/queries/group/legacy/index.js +2 -0
  85. package/dist/queries/group/legacy/read-core-groups.js +46 -0
  86. package/dist/queries/group/legacy/read-member-of-group.js +24 -0
  87. package/dist/queries/group/read-group-membership-endpoints.js +11 -0
  88. package/dist/queries/group/read-group-membership.js +6 -21
  89. package/dist/queries/identity/index.js +1 -0
  90. package/dist/queries/identity/read-identities.js +29 -0
  91. package/dist/queries/invitation/index.js +1 -0
  92. package/dist/queries/invitation/read-invitation.js +25 -0
  93. package/dist/queries/profile/index.js +1 -0
  94. package/dist/queries/profile/read-profile.js +15 -0
  95. package/dist/queries/role/index.js +1 -0
  96. package/dist/queries/role/read-role-node.js +13 -0
  97. package/dist/queries/user/legacy/index.js +1 -0
  98. package/dist/queries/user/legacy/read-user-profile.js +27 -0
  99. package/dist/runtime.d.ts +18203 -630
  100. package/dist/runtime.js +32 -7
  101. package/dist/schema/index.d.ts +7 -4
  102. package/dist/schema/index.js +8 -4
  103. package/dist/schema/legacy/index.js +1 -0
  104. package/dist/schema/legacy/schema.js +32 -0
  105. package/dist/schema/modules/application/legacy/entrypoint-entry.js +11 -0
  106. package/dist/schema/modules/application/legacy/functions/index.js +1 -0
  107. package/dist/schema/modules/application/legacy/functions/list-entrypoints.js +21 -0
  108. package/dist/schema/modules/application/legacy/index.js +2 -0
  109. package/dist/schema/modules/directory/functions/disconnect-directory.d.ts +13 -0
  110. package/dist/schema/modules/directory/functions/disconnect-directory.js +15 -0
  111. package/dist/schema/modules/directory/functions/index.d.ts +1 -0
  112. package/dist/schema/modules/directory/functions/index.js +1 -0
  113. package/dist/schema/modules/directory/index.d.ts +1 -0
  114. package/dist/schema/modules/directory/index.js +1 -0
  115. package/dist/schema/modules/group/classes/group-profile-link.d.ts +34 -0
  116. package/dist/schema/modules/group/classes/group-profile-link.js +21 -0
  117. package/dist/schema/modules/group/classes/group-profile.d.ts +15 -0
  118. package/dist/schema/modules/group/classes/group-profile.js +20 -0
  119. package/dist/schema/modules/group/classes/group.d.ts +73 -1
  120. package/dist/schema/modules/group/classes/group.js +28 -7
  121. package/dist/schema/modules/group/classes/index.d.ts +2 -1
  122. package/dist/schema/modules/group/classes/index.js +3 -1
  123. package/dist/schema/modules/group/functions/assign-member.js +17 -0
  124. package/dist/schema/modules/group/functions/create-group.js +20 -0
  125. package/dist/schema/modules/group/functions/delete-group.js +12 -0
  126. package/dist/schema/modules/group/functions/deprovision-group.js +14 -0
  127. package/dist/schema/modules/group/functions/index.js +7 -2
  128. package/dist/schema/modules/group/functions/provision-group.js +14 -0
  129. package/dist/schema/modules/group/functions/unassign-member.js +17 -0
  130. package/dist/schema/modules/group/functions/update-group.js +20 -0
  131. package/dist/schema/modules/group/index.d.ts +3 -3
  132. package/dist/schema/modules/group/index.js +4 -3
  133. package/dist/schema/modules/group/legacy/admission.d.ts +9 -0
  134. package/dist/schema/modules/group/legacy/admission.js +9 -0
  135. package/dist/schema/modules/group/legacy/classes/index.d.ts +1 -0
  136. package/dist/schema/modules/group/legacy/classes/index.js +1 -0
  137. package/dist/schema/modules/group/{classes → legacy/classes}/member-of-group.d.ts +10 -1
  138. package/dist/schema/modules/group/legacy/classes/member-of-group.js +32 -0
  139. package/dist/schema/modules/group/legacy/core-groups.d.ts +22 -0
  140. package/dist/schema/modules/group/legacy/core-groups.js +28 -0
  141. package/dist/schema/modules/group/legacy/index.d.ts +5 -0
  142. package/dist/schema/modules/group/legacy/index.js +6 -0
  143. package/dist/schema/modules/group/legacy/policies/belongs-to-group.d.ts +5 -0
  144. package/dist/schema/modules/group/legacy/policies/belongs-to-group.js +9 -0
  145. package/dist/schema/modules/group/legacy/policies/index.d.ts +2 -0
  146. package/dist/schema/modules/group/legacy/policies/index.js +2 -0
  147. package/dist/schema/modules/group/legacy/policies/owns-membership-group.d.ts +6 -0
  148. package/dist/schema/modules/group/legacy/policies/owns-membership-group.js +12 -0
  149. package/dist/schema/modules/group/legacy/relaxations.d.ts +21 -0
  150. package/dist/schema/modules/group/legacy/relaxations.js +27 -0
  151. package/dist/schema/modules/group/policies/describes-group-of-subject.d.ts +2 -0
  152. package/dist/schema/modules/group/policies/describes-group-of-subject.js +7 -0
  153. package/dist/schema/modules/group/policies/index.d.ts +2 -1
  154. package/dist/schema/modules/group/policies/index.js +2 -1
  155. package/dist/schema/modules/group/policies/is-group-profile-source.d.ts +2 -0
  156. package/dist/schema/modules/group/policies/is-group-profile-source.js +6 -0
  157. package/dist/schema/modules/group/types/group.js +10 -0
  158. package/dist/schema/modules/group/types/index.js +1 -0
  159. package/dist/schema/modules/invitation/classes/index.js +2 -0
  160. package/dist/schema/modules/invitation/classes/invitation-user.js +17 -0
  161. package/dist/schema/modules/invitation/classes/invitation.js +30 -0
  162. package/dist/schema/modules/invitation/functions/accept.js +16 -0
  163. package/dist/schema/modules/invitation/functions/cancel.js +12 -0
  164. package/dist/schema/modules/invitation/functions/index.js +4 -0
  165. package/dist/schema/modules/invitation/functions/resend.js +12 -0
  166. package/dist/schema/modules/invitation/functions/send.js +20 -0
  167. package/dist/schema/modules/invitation/index.js +2 -0
  168. package/dist/schema/modules/invitation/types/index.js +1 -0
  169. package/dist/schema/modules/invitation/types/invitation-status.js +5 -0
  170. package/dist/schema/modules/namespace/classes/alias.d.ts +2 -1
  171. package/dist/schema/modules/namespace/classes/alias.js +11 -2
  172. package/dist/schema/modules/namespace/functions/link.js +3 -2
  173. package/dist/schema/modules/namespace/functions/rename.js +3 -2
  174. package/dist/schema/modules/namespace/functions/unlink.js +3 -2
  175. package/dist/schema/modules/role/classes/index.d.ts +1 -0
  176. package/dist/schema/modules/role/classes/index.js +1 -0
  177. package/dist/schema/modules/role/classes/role.d.ts +16 -0
  178. package/dist/schema/modules/role/classes/role.js +19 -0
  179. package/dist/schema/modules/role/core/index.d.ts +1 -0
  180. package/dist/schema/modules/role/core/index.js +1 -0
  181. package/dist/schema/modules/role/core/roles.d.ts +37 -0
  182. package/dist/schema/modules/role/core/roles.js +30 -0
  183. package/dist/schema/modules/role/index.d.ts +2 -0
  184. package/dist/schema/modules/role/index.js +2 -0
  185. package/dist/schema/modules/user/classes/index.d.ts +2 -0
  186. package/dist/schema/modules/user/classes/index.js +3 -0
  187. package/dist/schema/modules/user/classes/user-profile-link.d.ts +35 -0
  188. package/dist/schema/modules/user/classes/user-profile-link.js +22 -0
  189. package/dist/schema/modules/user/classes/user-profile.d.ts +41 -0
  190. package/dist/schema/modules/user/classes/user-profile.js +30 -0
  191. package/dist/schema/modules/user/classes/user.d.ts +133 -8
  192. package/dist/schema/modules/user/classes/user.js +46 -15
  193. package/dist/schema/modules/user/functions/create-user.js +21 -0
  194. package/dist/schema/modules/user/functions/deactivate-user.js +12 -0
  195. package/dist/schema/modules/user/functions/delete-user.js +12 -0
  196. package/dist/schema/modules/user/functions/deprovision-user.js +14 -0
  197. package/dist/schema/modules/user/functions/index.js +8 -1
  198. package/dist/schema/modules/user/functions/invite-user.js +23 -4
  199. package/dist/schema/modules/user/functions/provision-user.js +25 -0
  200. package/dist/schema/modules/user/functions/reactivate-user.js +12 -0
  201. package/dist/schema/modules/user/functions/update-profile.js +16 -0
  202. package/dist/schema/modules/user/functions/update-user.js +22 -0
  203. package/dist/schema/modules/user/index.d.ts +2 -1
  204. package/dist/schema/modules/user/index.js +2 -1
  205. package/dist/schema/modules/user/legacy/account-properties.js +24 -0
  206. package/dist/schema/modules/user/legacy/functions/index.js +2 -0
  207. package/dist/schema/modules/user/legacy/functions/migrate-accounts.js +23 -0
  208. package/dist/schema/modules/user/legacy/functions/record-profile.js +18 -0
  209. package/dist/schema/modules/user/legacy/index.js +5 -0
  210. package/dist/schema/modules/user/legacy/invite.js +15 -0
  211. package/dist/schema/modules/user/legacy/relaxations.js +37 -0
  212. package/dist/schema/modules/user/policies/describes-subject.d.ts +2 -0
  213. package/dist/schema/modules/user/policies/describes-subject.js +7 -0
  214. package/dist/schema/modules/user/policies/index.d.ts +2 -0
  215. package/dist/schema/modules/user/policies/index.js +2 -0
  216. package/dist/schema/modules/user/policies/is-profile-source.d.ts +2 -0
  217. package/dist/schema/modules/user/policies/is-profile-source.js +6 -0
  218. package/dist/schema/modules/user/types/account.d.ts +12 -0
  219. package/dist/schema/modules/user/types/account.js +12 -0
  220. package/dist/schema/modules/user/types/index.d.ts +1 -1
  221. package/dist/schema/modules/user/types/index.js +1 -1
  222. package/dist/schema/modules/view-access/classes/view-access.d.ts +7 -11
  223. package/dist/schema/modules/view-access/classes/view-access.js +17 -12
  224. package/dist/schema/modules/view-access/index.d.ts +1 -2
  225. package/dist/schema/modules/view-access/index.js +1 -2
  226. package/dist/schema/modules/view-access/legacy/functions/assign-views.js +22 -0
  227. package/dist/schema/modules/view-access/legacy/functions/index.js +1 -0
  228. package/dist/schema/modules/view-access/legacy/index.js +2 -0
  229. package/dist/schema/modules/view-access/legacy/view-assignment.js +24 -0
  230. package/dist/schema/modules/view-access/policies/holds-view-access.d.ts +2 -0
  231. package/dist/schema/modules/view-access/policies/holds-view-access.js +5 -0
  232. package/dist/schema/modules/view-access/policies/index.d.ts +1 -0
  233. package/dist/schema/modules/view-access/policies/index.js +1 -0
  234. package/dist/schema/policies/has-role.d.ts +6 -0
  235. package/dist/schema/policies/has-role.js +9 -0
  236. package/dist/schema/policies/index.d.ts +1 -0
  237. package/dist/schema/policies/index.js +1 -4
  238. package/dist/schema/policies/legacy/administers-shell-class.js +21 -0
  239. package/dist/schema/policies/legacy/index.js +4 -0
  240. package/dist/schema/policies/legacy/is-self.js +9 -0
  241. package/dist/schema/policies/legacy/owns-class.js +12 -0
  242. package/dist/schema/policies/legacy/uses-function.js +9 -0
  243. package/dist/schema/schema.d.ts +1849 -118
  244. package/dist/schema/schema.js +35 -15
  245. package/dist/schema/types/attributes.js +15 -0
  246. package/dist/schema/types/index.js +1 -0
  247. package/dist/utils/attributes/attributes.js +12 -0
  248. package/dist/utils/attributes/index.js +1 -0
  249. package/dist/utils/index.js +3 -0
  250. package/dist/utils/same-json/index.js +1 -0
  251. package/dist/utils/same-json/same-json.js +9 -0
  252. package/package.json +4 -4
  253. package/dist/functions/application/list-entrypoints.js +0 -6
  254. package/dist/functions/user/record-profile.js +0 -18
  255. package/dist/mutations/user/index.js +0 -1
  256. package/dist/queries/application/index.js +0 -1
  257. package/dist/queries/application/read-installed-entrypoints.js +0 -28
  258. package/dist/queries/user/index.js +0 -1
  259. package/dist/queries/user/read-user-profile.js +0 -9
  260. package/dist/schema/modules/application/functions/index.d.ts +0 -1
  261. package/dist/schema/modules/application/functions/index.js +0 -1
  262. package/dist/schema/modules/application/functions/list-entrypoints.d.ts +0 -15
  263. package/dist/schema/modules/application/functions/list-entrypoints.js +0 -16
  264. package/dist/schema/modules/application/index.d.ts +0 -2
  265. package/dist/schema/modules/application/index.js +0 -2
  266. package/dist/schema/modules/application/types/entrypoint-entry.d.ts +0 -8
  267. package/dist/schema/modules/application/types/entrypoint-entry.js +0 -7
  268. package/dist/schema/modules/application/types/index.d.ts +0 -1
  269. package/dist/schema/modules/application/types/index.js +0 -1
  270. package/dist/schema/modules/group/classes/member-of-group.js +0 -12
  271. package/dist/schema/modules/group/core/administrators-group.d.ts +0 -1
  272. package/dist/schema/modules/group/core/administrators-group.js +0 -6
  273. package/dist/schema/modules/group/core/applications-group.d.ts +0 -1
  274. package/dist/schema/modules/group/core/applications-group.js +0 -6
  275. package/dist/schema/modules/group/core/index.d.ts +0 -3
  276. package/dist/schema/modules/group/core/index.js +0 -3
  277. package/dist/schema/modules/group/core/members-group.d.ts +0 -1
  278. package/dist/schema/modules/group/core/members-group.js +0 -6
  279. package/dist/schema/modules/group/functions/assign-member-to-group.js +0 -11
  280. package/dist/schema/modules/group/functions/unassign-member-from-group.js +0 -11
  281. package/dist/schema/modules/group/policies/belongs-to-group.d.ts +0 -1
  282. package/dist/schema/modules/group/policies/belongs-to-group.js +0 -5
  283. package/dist/schema/modules/user/functions/record-profile.js +0 -14
  284. package/dist/schema/modules/user/types/user-profile.d.ts +0 -7
  285. package/dist/schema/modules/user/types/user-profile.js +0 -7
  286. package/dist/schema/modules/view-access/core/index.d.ts +0 -1
  287. package/dist/schema/modules/view-access/core/index.js +0 -1
  288. package/dist/schema/modules/view-access/core/view-only-group.d.ts +0 -5
  289. package/dist/schema/modules/view-access/core/view-only-group.js +0 -10
  290. package/dist/schema/modules/view-access/functions/assign-views.d.ts +0 -16
  291. package/dist/schema/modules/view-access/functions/assign-views.js +0 -17
  292. package/dist/schema/modules/view-access/functions/index.d.ts +0 -1
  293. package/dist/schema/modules/view-access/functions/index.js +0 -1
  294. package/dist/schema/modules/view-access/types/index.js +0 -1
  295. package/dist/schema/modules/view-access/types/view-assignment.js +0 -16
  296. package/dist/schema/policies/administers-shell-class.js +0 -11
  297. package/dist/schema/policies/is-self.js +0 -5
  298. package/dist/schema/policies/owns-class.js +0 -7
  299. package/dist/schema/policies/uses-function.js +0 -5
  300. /package/dist/functions/group/{assign-member-to-group.js → assign-member.js} +0 -0
  301. /package/dist/functions/group/{unassign-member-from-group.js → unassign-member.js} +0 -0
package/README.md CHANGED
@@ -1,77 +1,80 @@
1
1
  # Shell Domain
2
2
 
3
- Shell owns two concrete Identity classes, User and Group, the member_of_group relation,
4
- the admin/member/applications/view-only Core groups, the Namespace class and its alias relation, the
5
- view_access relation, the `views` Core Namespace, three static methods, one User method, three Namespace methods, two Domain functions, and one
6
- application View, which is its entrypoint. The Schema names the Domain `Shell`. There is no Space, setup function, personal home, or public repair method.
3
+ Shell owns the account of each person (`User`), their groups (`Group`), its Roles (`Role`: the
4
+ profiles `workspace.member` ⊂ `workspace.admin` and the atomic `user.reader`, `user.writer`,
5
+ `group.reader`, `group.writer`, `directory.provisioner`), the Views an account without a profile
6
+ lands on (`view_access`), the instance Namespaces and their aliases, and one application View, its
7
+ entrypoint. All authority comes from Kernel Roles, held directly or through groups by Kernel
8
+ `extends_with`; a directory may provide accounts and groups. The design, its laws and its
9
+ amendments are in [`docs/design/accounts-and-roles.md`](../docs/design/accounts-and-roles.md);
10
+ each law's enforcement and test are in [`docs/accounts/laws.tsv`](../docs/accounts/laws.tsv), each
11
+ scenario's evidence in [`docs/accounts/scenarios.tsv`](../docs/accounts/scenarios.tsv).
12
+
13
+ The model before Roles is kept for its callers under `legacy/` folders, listed in
14
+ [`legacy/LEDGER.md`](./legacy/LEDGER.md) by the method of [`docs/legacy.md`](../docs/legacy.md); it
15
+ is described in [`docs/legacy/shell-domain-before-roles.md`](../docs/legacy/shell-domain-before-roles.md).
7
16
 
8
17
  ## Contracts
9
18
 
10
- | Static method | Input | Output |
11
- | --- | --- | --- |
12
- | User.invite | `{ user: UserPath, email: string }` | `{ invitationId, user, state }` |
13
- | Group.assignMember | `{ member: UserPath \| GroupPath, group: GroupPath }` | `{}` |
14
- | Group.unassignMember | Same | `{}` |
15
-
16
- | User method | Input | Output |
17
- | --- | --- | --- |
18
- | User.recordProfile | `{ email?: string, displayName?: string }` | `{}` |
19
-
20
- An account records the email and display name it signs in with, so the directory can name it, in
21
- `claimedEmail` and `claimedName`: named apart from the `email` or `displayName` a Domain extending
22
- User declares for its own profile. Its
23
- `isSelf` Policy admits the account itself alone, and Shell writes, with its own authority, only what
24
- changed; an email is kept in lower case. The values come from the account, not from its identity
25
- provider: they name it for display and decide nothing. The GUI records them at each sign-in.
26
-
27
- | Namespace method | Input | Output |
28
- | --- | --- | --- |
29
- | Namespace.link | `{ name: string, target: NodePath }` | `{}` |
30
- | Namespace.unlink | `{ name: string }` | `{}` |
31
- | Namespace.rename | `{ name: string, to: string }` | `{}` |
32
-
33
- | Domain function | Input | Output |
34
- | --- | --- | --- |
35
- | listEntrypoints | `{}` | `{ entrypoints: { origin, name, view }[] }` |
36
- | assignViews | `{ assignments: { identity, set?, unset? }[] }` | `{}` |
37
-
38
- listEntrypoints reads, with Shell's own authority, every Kernel `of_domain` locator whose View has
39
- an outgoing `entrypoint` Edge, and returns one entry per Domain in origin order: its origin, the
40
- `name` of its Domain Node, and the key of its entrypoint View. A Domain without an entrypoint is
41
- not listed. Shell requires `read` on Kernel `Domain` and `of_domain`, and `traverse` on `entrypoint`
42
- and `View`. Its `usesFunction` Policy admits any caller whose composed profile holds `can_use`
43
- on the Function, so holding the capability is enough.
19
+ | Method | Called on | Admitted | Input | Output |
20
+ | --- | --- | --- | --- | --- |
21
+ | `User.create` | static | `user.writer` | `{ email, name, givenName?, familyName?, attributes? }` | `{ user, created }` |
22
+ | `User.invite` | static | `user.writer` | `{ user, profile?: 'member' \| 'admin' }` | `{ invitationId, user, state }` |
23
+ | `User.update` | the account | `user.writer` | `{ name?, email?, givenName?, familyName?, icon?, attributes? }` | `{}` |
24
+ | `User.updateProfile` | the account | its holder | `{ name?, icon? }` | `{}` |
25
+ | `User.deactivate`, `User.reactivate`, `User.delete` | the account | `user.writer` | `{}` | `{}` |
26
+ | `User.provision` | static | `directory.provisioner` | `{ directory, externalId, email, name, givenName?, familyName?, active }` | `{ user, created, adopted }` |
27
+ | `User.deprovision` | static | `directory.provisioner` | `{ directory, externalId }` | `{}` |
28
+ | `Group.create` | static | `group.writer` | `{ name, description?, icon?, attributes? }` | `{ group }` |
29
+ | `Group.update`, `Group.delete` | the group | `group.writer` | `{ name?, description?, icon?, attributes? }`, `{}` | `{}` |
30
+ | `Group.assignMember`, `Group.unassignMember` | static | `group.writer`, `directory.provisioner` | `{ member, group }` (`@NodeId` paths) | `{}` |
31
+ | `Group.provision` | static | `directory.provisioner` | `{ directory, externalId, name }` | `{ group, created }` |
32
+ | `Group.deprovision` | static | `directory.provisioner` | `{ directory, externalId }` | `{}` |
33
+ | `disconnectDirectory` | function | `directory.provisioner` | `{ directory }` | `{ users, groups }` |
34
+
35
+ Refusals (`reason.code`, family): `USER_EMAIL_INVALID` (VALIDATION_ERROR); `USER_NOT_FOUND`,
36
+ `GROUP_NOT_FOUND` (NOT_FOUND); `USER_EMAIL_TAKEN`, `USER_DIRECTORY_MANAGED`,
37
+ `USER_ADMINISTRATOR_PROTECTED`, `USER_LAST_ADMINISTRATOR`, `USER_ACTIVE`, `USER_SUSPENDED`,
38
+ `PROFILE_NOT_HELD`, `GROUP_DIRECTORY_MANAGED`, `GROUP_NOT_DIRECTORY_MANAGED`,
39
+ `GROUP_ROLE_PROTECTED` (details `{ role }`), `GROUP_MEMBERSHIP_CYCLE`, `DIRECTORY_CONFLICT`
40
+ (details `{ user }`), `ACCOUNT_CHANGED`, `GROUP_CHANGED` (CONFLICT); the membership
41
+ methods keep `INVALID_GROUP_MEMBERSHIP_REFERENCE`, `GROUP_MEMBERSHIP_ENDPOINTS_UNAVAILABLE`,
42
+ `GROUP_MEMBERSHIP_CONFLICT`, `GROUP_MEMBERSHIP_UNCONFIRMED`, and invite `INVITATION_CONFLICT`,
43
+ `INVITATION_REJECTED`. The SDK has no FORBIDDEN business family: a law that forbids a change for
44
+ the state of an account, a group or its caller answers CONFLICT.
45
+
46
+ User and Group declare no write rule: only their methods write them, with Shell's authority, after
47
+ the laws the Kernel cannot state (U1–U6, G2–G4). A Domain that needs accounts asks `user.writer`
48
+ (and `user.reader`) in its release for itself, `requirements({ roles: [{ role: S.core.nodes['user.writer'], members: [requirements.domain] }] })`,
49
+ links its record to the account by an Edge of its own, and tests its own Roles with its own
50
+ `hasRole` Policy. Every write keeps `frozen` = `suspended` or `directoryActive === false` (U2): the
51
+ Kernel refuses to authenticate a frozen account.
52
+
53
+ ## Invitation
54
+
55
+ `User.invite` grants the profile (`extends_with` to `profile.<name>`), then asks Admin to send the
56
+ invitation through Shell's enrollment Integration, which carries `{ user, email, profile, requestId,
57
+ requestedBy }`: the email is the account's own. Its Provider mints an invocation-bound Shell proof
58
+ for its configured HTTPS ingress audience. A returned pending invitation does not prove email
59
+ delivery or completed registration. Admin binds the first sign-in of the verified email to the
60
+ account (U8).
61
+
62
+ ## Release
63
+
64
+ `domain.ts` declares Roles and scopes. `workspace.admin` grants every Shell Role and the grantable
65
+ Kernel Roles (R2); the bundle member ⊂ admin and the atomic Roles are release members (AM1);
66
+ member holds Kernel `writer`, admin Kernel `admin`; no profile holds Kernel `reader`, which admin
67
+ grants to whoever only opens its Views (AM10); Shell itself holds
68
+ Kernel `authority.reader`, `graph.reader` and `graph.writer`. Installing it requires an installer
69
+ that grants every Role it binds: Root.
44
70
 
45
- The workspace opens only once listEntrypoints answers, so every profile that admits a person to
46
- the workspace holds it. Administrators and members hold both listEntrypoints and View.resolve
47
- directly (a Core Edge cannot author Kernel `extends_with`): an invited person, whom Admin assigns
48
- to Core member, can open the workspace. The Core `applications` Group carries the same two
49
- capabilities for Identities outside Members, and `query`: the `/v/<name>` page reads its Path with
50
- a Query under the visitor's own rights, so read rules still decide what it sees. Share them
51
- dynamically with
52
- `Group.assignMember({ member: identity, group: applications })`, which composes the profile through
53
- `extends_with`; `unassignMember` withdraws it.
54
-
55
- User extends Kernel.Identity and owns only optional creationKey correlation.
56
- Concrete business classes may declare their own displayName/email; Shell never reads or writes them.
57
- Group extends Kernel.Identity, Named and Descriptable. Authentication remains the
58
- Kernel-owned, write-once iss/sub binding. Invitation email is explicit input, not a User property.
59
-
60
- | Operation | Schema Policy alternatives, in addition to Kernel admission |
61
- | --- | --- |
62
- | invite | Core admin membership AND Shell-owned concrete User class; or ownership of the User's concrete class |
63
- | assignMember / unassignMember | Core admin membership AND Shell-owned concrete Group class; or ownership of the Group's concrete class |
71
+ ## View access
64
72
 
65
- ownsClass follows instance_of → concrete class → of_domain → caller. It does not
66
- infer ownership from an email, a subclass name, or ownership of an ancestor class.
67
- A Domain cannot assign its Employee to Core member merely by owning Employee. Admin's invitation
68
- orchestration retains that responsibility. A Group's owner may manage any admitted User or Group in that Group.
69
- administersShellClass connects Core admin membership and concrete ownership in one Policy pattern;
70
- it does not treat inheritance from Shell as ownership. These are callable restrictions, not an
71
- isolation boundary against Root/Manager or the existing broad administrator Kernel profile.
72
- With Kernel Host beta94 or newer, an external caller needs callable authority through its own
73
- identity composition AND a passing callable Policy. Declare exact foreign methods in the calling
74
- Domain's requirements; can_use no longer bypasses the Policy. Root and exact owner exceptions remain.
73
+ **A View given to an Identity decides where it lands, never what it reads.** `view_access` runs
74
+ from any Identity — an account, a group, a Role — to one Kernel View; each end detaches with its
75
+ Node. An admin writes it by a Mutation; an admin, or the Edge's audience and its members, read it.
76
+ A visitor's landing is its own Query (`@astrale-os/shell`): `workspace.member` opens the workspace; anyone else, reading
77
+ with Kernel `reader`, the Views it holds.
75
78
 
76
79
  ## Namespaces and aliases
77
80
 
@@ -111,99 +114,8 @@ sealed refusals:
111
114
  | `MUTATION_PRECONDITION_FAILED` (the alias Edge exists, is gone, or carries another name) | `TARGET_ALREADY_ALIASED` | `NAME_NOT_FOUND` | `NAME_NOT_FOUND` |
112
115
  | `MUTATION_LOCATOR_INVALID` (the target Path reaches no Node, or the target was deleted) | `TARGET_NOT_FOUND` | `NAME_NOT_FOUND` | `NAME_NOT_FOUND` |
113
116
 
114
- Every other failure propagates. Core admin holds the three methods, `read` and `traverse` on
115
- Namespace, and every operation on alias. Administration follows `administersShellClass` on the
116
- Namespace, as for Groups.
117
-
118
- ## View access
119
-
120
- **A View given to an account decides where it lands, never what it reads.** `view_access` runs from
121
- a User or a Group to one Kernel View. The Core group `view-only` limits its members to the Views
122
- they hold, directly or through a group they are a direct member of; membership in `view-only` and
123
- in Core `admin` counts the same way. Everyone else, and every administrator, opens the workspace as
124
- before. Nothing else changes: the View's own Domain still
125
- guards every Node it shows, and `View.resolve` and `listEntrypoints` answer as before.
126
-
127
- | Fact | Who writes it | How |
128
- | --- | --- | --- |
129
- | `view_access(holder → View)` | Core admin | `assignViews`, or a Mutation that creates or deletes the Edge. It carries no property. |
130
- | `member_of_group(user → view-only)` | Core admin | `Group.assignMember` / `Group.unassignMember`. |
131
-
132
- `view_access` declares `read: true` and `traverse: true`, as `alias` does. Its target is a
133
- Class Shell does not own, so it detaches when its View is deleted, by a Mutation or by a release
134
- that removes the View. Clients read a visitor's access with its own Queries
135
- (`shell.views.access()`): never a read function. A Shell release without `view-only` limits no one.
136
-
137
- `assignViews` takes, for each identity (a User or a Group, by `@NodeId`), the Views to give
138
- (`set`) and to withdraw (`unset`), by `@NodeId`. It reads the identities' `view_access` Edges and
139
- writes only what differs, in one Mutation guarded by that read, with Shell's own authority: a View
140
- already given or already withdrawn costs nothing, and a concurrent change refuses the whole write
141
- (`VIEW_ACCESS_CONFLICT`). An identity listed twice gets both lists; one View both given and
142
- withdrawn is refused. One call changes at most 40 identities and 20 Views per list. Core admin
143
- holds it, and may share `can_use` on it. It never changes `view-only`: whether an identity opens the workspace stays its
144
- membership, which `Group.assignMember` changes.
145
-
146
- To limit an invited person to one View: invite them, assign them to `view-only`, give them the
147
- View with `assignViews`, and give the View an alias in `views` so `/v/<name>` opens it.
148
-
149
- ## Flows
150
-
151
- ```text
152
- Domain creates Employee extending User → unregistered, no group
153
- Direct credential-evidenced Register → same node authenticates, still no group
154
- User.invite → provider authentication → Admin ingress → WorkOS/login
155
- → Admin Register on that same node → member assignment → completed
156
- Group.assignMember → member_of_group + Kernel.extends_with in one atomic mutation
157
- Group.unassignMember → remove both edges in one atomic mutation
158
- ```
159
-
160
- The invitation flow is coordinated by Admin, not by an Employee callback. Shell's Integration
161
- carries only user/email/requestId/requestedBy. Its Provider mints an invocation-bound Shell
162
- proof for its configured HTTPS ingress audience; target/sourceProof are not business inputs.
163
- A returned pending invitation does not prove email delivery or completed registration.
164
-
165
- `assignMember({ member: A, group: B })` adds A to B. A and its current and future members inherit
166
- B's authority. Groups can have several parents; Kernel rejects self-membership and cycles in the
167
- same transaction as both membership edges. The target Group's manager authorizes this delegation;
168
- the child Group's managers can subsequently change the population that inherits it.
169
-
170
- `unassignMember` removes only that direct pair. Another membership path can preserve effective
171
- access. Queries of `member_of_group` continue to return direct facts; Policy evaluation expands
172
- the caller's identity composition. Shell must be able to traverse both concrete endpoint Classes,
173
- including a foreign Group used as the member.
174
-
175
- Membership methods converge both edges, including an observed partial membership.
176
- After an uncertain mutation response they re-read the pair; an unconfirmed outcome remains
177
- explicitly unconfirmed. This is not a global repair scan or an exactly-once guarantee.
178
-
179
- A Team class extending Group can carry a business permission edge to Project. Membership
180
- composition lets an Employee, as caller, inherit Team's authority; the protected Project Policy is
181
- still evaluated by Kernel. Removing composition removes that authority path. Installed
182
- Kernel E2E evidence, not a handler test, qualifies this behavior.
183
-
184
- ## Installation and View
185
-
186
- The Shell principal requests all Kernel root functions, the required extends_with operations,
187
- and the declared grant/revoke authority. Core admin receives the full declared Shell profile,
188
- including invite, recordProfile, assignMember, unassignMember, link, unlink, rename and assignViews
189
- so humans inheriting admin can call those methods. Core member receives Download, Introspect, Query,
190
- Mutate, View.resolve, listEntrypoints and recordProfile, not blanket class-read grants. Core applications receives listEntrypoints,
191
- View.resolve and Query.
192
- The Domain definition's requirements, including Core Identity capabilities in requirements.core, are owned by domain.ts and materialized by installation,
193
- never by invitation handlers.
194
-
195
- The sole application entrypoint uses the Vite React frontend at /, composed with
196
- `@astrale-os/shell-react` and `@astrale-os/ui`. It administers the instance under the caller's own
197
- session, in three tabs. **Access** lists users, then groups: whether each opens the whole OS or only its Views (two spelled-out options
198
- over its `view-only` membership; an administrator always does, a Core group is decided by its role)
199
- and, through a picker, the installed Views given to it. **Groups** lists the groups and the direct
200
- members of the chosen one, to add or remove. **Addresses** lists the installed Views and the name
201
- `/v/<name>` each opens at, to give, rename or remove through `Namespace.link`, `rename` and `unlink`;
202
- a name the Namespace would refuse, or one another View has, is refused beside the field before it is
203
- sent. Every change applies at once and comes back with a
204
- message when the Kernel refuses it. A user shows its recorded display name and email, or its concrete
205
- class when it recorded none, never a guessed foreign profile. Every read is a Query under the
206
- caller's rights; the screen proxies no privileged read.
117
+ Every other failure propagates. `workspace.admin` holders call the three methods, and write `alias`
118
+ Edges by their own Mutations too.
207
119
 
208
120
  ## Versions
209
121
 
@@ -224,7 +136,7 @@ release.
224
136
 
225
137
  Each declaration, Query and Mutation has its own semantic file. Layer roots are facades;
226
138
  functions own orchestration, integrations/providers own external effects, views/ui own the
227
- directory surface. Runtime has one default export and binds the three static Workflows.
139
+ directory surface. Runtime has one default export and binds every handler.
228
140
  The Dataset is referenced lazily by the root astrale.config.ts.
229
141
 
230
142
  Domain authors import Schema from @astrale-domains/shell; platform workers use the explicit
@@ -252,15 +164,3 @@ schema import cannot traverse Shell's private application or runtime implementat
252
164
  Source, package, and deterministic test qualification remain distinct from installed-instance,
253
165
  released-package, browser, and live-credential evidence. Shell does not broker authentication
254
166
  tokens; standard Domain token exchange is owned by Protocol, Server, and SDK.
255
-
256
- ### Breaking membership API migration
257
-
258
- `Group.assignMember` / `Group.unassignMember` replace `assignUser` / `unassignUser` without aliases.
259
- Callers must change `{ user, group }` to `{ member, group }` and declare the new exact callable
260
- requirements. The `member_of_group` Class key is preserved; its source role is now `member` and
261
- accepts User or Group families. Existing User memberships remain valid.
262
-
263
- Rebuild and install all affected Schema dependents as one coherent revision closure. Admin bootstrap
264
- and invitation completion must use the new API when this Shell revision is installed. A downgrade
265
- to the User-only contract requires handling any Group-to-Group facts first. Validate public admission,
266
- foreign endpoint traversal, and deployed revisions during the coordinated release.