@astrale-domains/shell 0.1.0-beta.9 → 0.1.1

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 (244) hide show
  1. package/README.md +264 -64
  2. package/dist/domain.d.ts +225 -0
  3. package/dist/domain.js +96 -0
  4. package/dist/functions/application/index.js +1 -0
  5. package/dist/functions/application/list-entrypoints.js +6 -0
  6. package/dist/functions/group/assign-member-to-group.js +4 -0
  7. package/dist/functions/group/change-group-membership.js +34 -0
  8. package/dist/functions/group/group-membership-errors.js +23 -0
  9. package/dist/functions/group/index.js +2 -0
  10. package/dist/functions/group/unassign-member-from-group.js +4 -0
  11. package/dist/functions/namespace/index.js +3 -0
  12. package/dist/functions/namespace/link.js +30 -0
  13. package/dist/functions/namespace/namespace-errors.js +28 -0
  14. package/dist/functions/namespace/namespace-name.js +13 -0
  15. package/dist/functions/namespace/rename.js +31 -0
  16. package/dist/functions/namespace/unlink.js +21 -0
  17. package/dist/functions/user/index.js +2 -0
  18. package/dist/functions/user/invite-user.js +39 -0
  19. package/dist/functions/user/record-profile.js +18 -0
  20. package/dist/functions/view-access/assign-views.js +86 -0
  21. package/dist/functions/view-access/index.js +1 -0
  22. package/dist/functions/view-access/view-access-errors.js +28 -0
  23. package/dist/index.d.ts +1 -3
  24. package/dist/index.js +1 -3
  25. package/dist/integrations/index.d.ts +1 -0
  26. package/dist/integrations/index.js +1 -0
  27. package/dist/integrations/integrations.d.ts +9 -0
  28. package/dist/integrations/integrations.js +2 -0
  29. package/dist/integrations/user-invitation/index.d.ts +4 -0
  30. package/dist/integrations/user-invitation/index.js +3 -0
  31. package/dist/integrations/user-invitation/invitation-request-failure.d.ts +5 -0
  32. package/dist/integrations/user-invitation/invitation-request-failure.js +9 -0
  33. package/dist/integrations/user-invitation/invite-user-request.d.ts +6 -0
  34. package/dist/integrations/user-invitation/invite-user-request.js +1 -0
  35. package/dist/integrations/user-invitation/request-user-invitation.d.ts +8 -0
  36. package/dist/integrations/user-invitation/request-user-invitation.js +9 -0
  37. package/dist/mutations/group/index.js +1 -1
  38. package/dist/mutations/group/set-group-membership.js +29 -0
  39. package/dist/mutations/namespace/alias-write.js +22 -0
  40. package/dist/mutations/namespace/index.js +3 -0
  41. package/dist/mutations/namespace/link-alias.js +15 -0
  42. package/dist/mutations/namespace/rename-alias.js +13 -0
  43. package/dist/mutations/namespace/unlink-alias.js +13 -0
  44. package/dist/mutations/user/index.js +1 -1
  45. package/dist/mutations/user/record-user-profile.js +13 -0
  46. package/dist/mutations/view-access/index.js +1 -0
  47. package/dist/mutations/view-access/set-view-access.js +29 -0
  48. package/dist/providers/admin-enrollment/create-admin-enrollment-provider.js +78 -0
  49. package/dist/providers/admin-enrollment/decode-admin-invitation-response.js +20 -0
  50. package/dist/providers/admin-enrollment/index.js +1 -0
  51. package/dist/providers/admin-enrollment/read-enrollment-response.js +34 -0
  52. package/dist/queries/application/index.js +1 -0
  53. package/dist/queries/application/read-installed-entrypoints.js +28 -0
  54. package/dist/queries/group/index.js +2 -0
  55. package/dist/queries/group/read-group-membership-endpoints.js +18 -0
  56. package/dist/queries/group/read-group-membership.js +35 -0
  57. package/dist/queries/namespace/index.js +2 -0
  58. package/dist/queries/namespace/read-designated-node.js +12 -0
  59. package/dist/queries/namespace/read-view-aliases.js +46 -0
  60. package/dist/queries/user/index.js +1 -5
  61. package/dist/queries/user/read-user-profile.js +9 -0
  62. package/dist/queries/view-access/index.js +1 -0
  63. package/dist/queries/view-access/read-view-access.js +35 -0
  64. package/dist/runtime.d.ts +1603 -6784
  65. package/dist/runtime.js +24 -14
  66. package/dist/schema/index.d.ts +7 -6
  67. package/dist/schema/index.js +6 -6
  68. package/dist/schema/modules/application/functions/index.d.ts +1 -0
  69. package/dist/schema/modules/application/functions/index.js +1 -0
  70. package/dist/schema/modules/application/functions/list-entrypoints.d.ts +15 -0
  71. package/dist/schema/modules/application/functions/list-entrypoints.js +16 -0
  72. package/dist/schema/modules/application/index.d.ts +2 -0
  73. package/dist/schema/modules/application/index.js +2 -0
  74. package/dist/schema/modules/application/types/entrypoint-entry.d.ts +8 -0
  75. package/dist/schema/modules/application/types/entrypoint-entry.js +7 -0
  76. package/dist/schema/modules/application/types/index.d.ts +1 -0
  77. package/dist/schema/modules/application/types/index.js +1 -0
  78. package/dist/schema/modules/group/classes/group.d.ts +24 -0
  79. package/dist/schema/modules/group/classes/group.js +11 -0
  80. package/dist/schema/modules/group/classes/index.d.ts +2 -0
  81. package/dist/schema/modules/group/classes/index.js +2 -0
  82. package/dist/schema/modules/group/classes/member-of-group.d.ts +30 -0
  83. package/dist/schema/modules/group/classes/member-of-group.js +12 -0
  84. package/dist/schema/modules/group/core/administrators-group.d.ts +1 -0
  85. package/dist/schema/modules/group/core/administrators-group.js +6 -0
  86. package/dist/schema/modules/group/core/applications-group.d.ts +1 -0
  87. package/dist/schema/modules/group/core/applications-group.js +6 -0
  88. package/dist/schema/modules/group/core/index.d.ts +3 -0
  89. package/dist/schema/modules/group/core/index.js +3 -0
  90. package/dist/schema/modules/group/core/members-group.d.ts +1 -0
  91. package/dist/schema/modules/group/core/members-group.js +6 -0
  92. package/dist/schema/modules/group/functions/assign-member-to-group.js +11 -0
  93. package/dist/schema/modules/group/functions/index.js +2 -0
  94. package/dist/schema/modules/group/functions/unassign-member-from-group.js +11 -0
  95. package/dist/schema/modules/group/index.d.ts +3 -0
  96. package/dist/schema/modules/group/index.js +3 -0
  97. package/dist/schema/modules/group/policies/belongs-to-group.d.ts +1 -0
  98. package/dist/schema/modules/group/policies/belongs-to-group.js +5 -0
  99. package/dist/schema/modules/group/policies/index.d.ts +1 -0
  100. package/dist/schema/modules/group/policies/index.js +1 -0
  101. package/dist/schema/modules/group/types/group-membership-input.js +8 -0
  102. package/dist/schema/modules/group/types/index.js +1 -0
  103. package/dist/schema/modules/namespace/classes/alias.d.ts +31 -0
  104. package/dist/schema/modules/namespace/classes/alias.js +13 -0
  105. package/dist/schema/modules/namespace/classes/index.d.ts +2 -0
  106. package/dist/schema/modules/namespace/classes/index.js +2 -0
  107. package/dist/schema/modules/namespace/classes/namespace.d.ts +31 -0
  108. package/dist/schema/modules/namespace/classes/namespace.js +10 -0
  109. package/dist/schema/modules/namespace/core/index.d.ts +1 -0
  110. package/dist/schema/modules/namespace/core/index.js +1 -0
  111. package/dist/schema/modules/namespace/core/views-namespace.d.ts +2 -0
  112. package/dist/schema/modules/namespace/core/views-namespace.js +7 -0
  113. package/dist/schema/modules/namespace/functions/index.js +3 -0
  114. package/dist/schema/modules/namespace/functions/link.js +11 -0
  115. package/dist/schema/modules/namespace/functions/rename.js +11 -0
  116. package/dist/schema/modules/namespace/functions/unlink.js +11 -0
  117. package/dist/schema/modules/namespace/index.d.ts +2 -0
  118. package/dist/schema/modules/namespace/index.js +2 -0
  119. package/dist/schema/modules/namespace/types/index.js +1 -0
  120. package/dist/schema/modules/namespace/types/namespace-name.js +7 -0
  121. package/dist/schema/modules/user/classes/index.d.ts +1 -0
  122. package/dist/schema/modules/user/classes/index.js +1 -0
  123. package/dist/schema/modules/user/classes/user.d.ts +34 -0
  124. package/dist/schema/modules/user/classes/user.js +21 -0
  125. package/dist/schema/modules/user/functions/index.js +2 -0
  126. package/dist/schema/modules/user/functions/invite-user.js +12 -0
  127. package/dist/schema/modules/user/functions/record-profile.js +14 -0
  128. package/dist/schema/modules/user/index.d.ts +2 -0
  129. package/dist/schema/modules/user/index.js +2 -0
  130. package/dist/schema/modules/user/types/index.d.ts +2 -0
  131. package/dist/schema/modules/user/types/index.js +2 -0
  132. package/dist/schema/modules/user/types/invitation-summary.d.ts +16 -0
  133. package/dist/schema/modules/user/types/invitation-summary.js +15 -0
  134. package/dist/schema/modules/user/types/user-profile.d.ts +7 -0
  135. package/dist/schema/modules/user/types/user-profile.js +7 -0
  136. package/dist/schema/modules/view-access/classes/index.d.ts +1 -0
  137. package/dist/schema/modules/view-access/classes/index.js +1 -0
  138. package/dist/schema/modules/view-access/classes/view-access.d.ts +32 -0
  139. package/dist/schema/modules/view-access/classes/view-access.js +18 -0
  140. package/dist/schema/modules/view-access/core/index.d.ts +1 -0
  141. package/dist/schema/modules/view-access/core/index.js +1 -0
  142. package/dist/schema/modules/view-access/core/view-only-group.d.ts +5 -0
  143. package/dist/schema/modules/view-access/core/view-only-group.js +10 -0
  144. package/dist/schema/modules/view-access/functions/assign-views.d.ts +16 -0
  145. package/dist/schema/modules/view-access/functions/assign-views.js +17 -0
  146. package/dist/schema/modules/view-access/functions/index.d.ts +1 -0
  147. package/dist/schema/modules/view-access/functions/index.js +1 -0
  148. package/dist/schema/modules/view-access/index.d.ts +3 -0
  149. package/dist/schema/modules/view-access/index.js +3 -0
  150. package/dist/schema/modules/view-access/types/index.js +1 -0
  151. package/dist/schema/modules/view-access/types/view-assignment.js +16 -0
  152. package/dist/schema/policies/administers-shell-class.js +11 -0
  153. package/dist/schema/policies/index.js +4 -0
  154. package/dist/schema/policies/is-self.js +5 -0
  155. package/dist/schema/policies/owns-class.js +7 -0
  156. package/dist/schema/policies/uses-function.js +5 -0
  157. package/dist/schema/schema.d.ts +833 -0
  158. package/dist/schema/schema.js +35 -0
  159. package/dist/schema/views/application-view.js +4 -0
  160. package/dist/schema/views/index.js +1 -0
  161. package/dist/utils/canonical-node-path/index.js +1 -0
  162. package/dist/utils/canonical-node-path/parse-canonical-node-path.js +8 -0
  163. package/package.json +50 -10
  164. package/dist/actions/index.js +0 -1
  165. package/dist/actions/user/index.js +0 -1
  166. package/dist/actions/user/resolve-home.js +0 -19
  167. package/dist/application.d.ts +0 -9809
  168. package/dist/application.js +0 -29
  169. package/dist/mutations/group/membership.js +0 -19
  170. package/dist/mutations/space/access.js +0 -23
  171. package/dist/mutations/space/default.js +0 -23
  172. package/dist/mutations/space/index.js +0 -2
  173. package/dist/mutations/user/repair.js +0 -83
  174. package/dist/queries/space/access.js +0 -12
  175. package/dist/queries/space/admin.js +0 -20
  176. package/dist/queries/space/index.js +0 -3
  177. package/dist/queries/space/member.js +0 -17
  178. package/dist/queries/user/groups.js +0 -17
  179. package/dist/queries/user/home.js +0 -21
  180. package/dist/queries/user/owned-spaces.js +0 -17
  181. package/dist/queries/user/profile.js +0 -14
  182. package/dist/queries/user/setup.js +0 -16
  183. package/dist/schema/domain/index.d.ts +0 -1665
  184. package/dist/schema/domain/index.js +0 -39
  185. package/dist/schema/group/class.d.ts +0 -323
  186. package/dist/schema/group/class.js +0 -7
  187. package/dist/schema/group/core.d.ts +0 -10
  188. package/dist/schema/group/core.js +0 -14
  189. package/dist/schema/group/index.d.ts +0 -6
  190. package/dist/schema/group/index.js +0 -6
  191. package/dist/schema/group/methods.d.ts +0 -13
  192. package/dist/schema/group/methods.js +0 -22
  193. package/dist/schema/group/policies.d.ts +0 -1
  194. package/dist/schema/group/policies.js +0 -6
  195. package/dist/schema/group/relationships.d.ts +0 -16
  196. package/dist/schema/group/relationships.js +0 -8
  197. package/dist/schema/group/view.d.ts +0 -1
  198. package/dist/schema/group/view.js +0 -6
  199. package/dist/schema/home/index.d.ts +0 -1
  200. package/dist/schema/home/index.js +0 -1
  201. package/dist/schema/home/view.d.ts +0 -1
  202. package/dist/schema/home/view.js +0 -4
  203. package/dist/schema/setup/functions.d.ts +0 -28
  204. package/dist/schema/setup/functions.js +0 -27
  205. package/dist/schema/setup/index.d.ts +0 -1
  206. package/dist/schema/setup/index.js +0 -1
  207. package/dist/schema/space/class.d.ts +0 -80
  208. package/dist/schema/space/class.js +0 -11
  209. package/dist/schema/space/core.d.ts +0 -8
  210. package/dist/schema/space/core.js +0 -15
  211. package/dist/schema/space/index.d.ts +0 -6
  212. package/dist/schema/space/index.js +0 -6
  213. package/dist/schema/space/methods.d.ts +0 -18
  214. package/dist/schema/space/methods.js +0 -32
  215. package/dist/schema/space/policies.d.ts +0 -4
  216. package/dist/schema/space/policies.js +0 -21
  217. package/dist/schema/space/relationships.d.ts +0 -64
  218. package/dist/schema/space/relationships.js +0 -24
  219. package/dist/schema/space/view.d.ts +0 -1
  220. package/dist/schema/space/view.js +0 -6
  221. package/dist/schema/user/class.d.ts +0 -278
  222. package/dist/schema/user/class.js +0 -11
  223. package/dist/schema/user/index.d.ts +0 -3
  224. package/dist/schema/user/index.js +0 -3
  225. package/dist/schema/user/methods.d.ts +0 -7
  226. package/dist/schema/user/methods.js +0 -11
  227. package/dist/schema/user/view.d.ts +0 -1
  228. package/dist/schema/user/view.js +0 -6
  229. package/dist/workflows/group/assign.js +0 -3
  230. package/dist/workflows/group/change.js +0 -31
  231. package/dist/workflows/group/index.js +0 -3
  232. package/dist/workflows/group/unassign.js +0 -3
  233. package/dist/workflows/index.js +0 -3
  234. package/dist/workflows/setup/admin.js +0 -3
  235. package/dist/workflows/setup/index.js +0 -5
  236. package/dist/workflows/setup/member.js +0 -3
  237. package/dist/workflows/setup/plan.js +0 -88
  238. package/dist/workflows/setup/provision.js +0 -57
  239. package/dist/workflows/setup/run.js +0 -74
  240. package/dist/workflows/space/access.js +0 -41
  241. package/dist/workflows/space/add.js +0 -3
  242. package/dist/workflows/space/default.js +0 -37
  243. package/dist/workflows/space/index.js +0 -4
  244. package/dist/workflows/space/remove.js +0 -3
@@ -1,39 +0,0 @@
1
- import { defineSchema, KernelSchema, schema, } from '@astrale-os/sdk/schema';
2
- import { Group, adminGroup, groupAssignUser, groupCore, groupUnassignUser, groupView, maySetupUsers, memberGroup, member_of_group, } from '#schema/group';
3
- import { homeView } from '#schema/home';
4
- import { setupAdmin, setupMember } from '#schema/setup';
5
- import { Space, administers_space, belongsToSpace, default_space, defaultSpace, mayAdministerSpace, member_of_space, owns_space, ownsSpace, spaceAddUser, spaceCore, spaceRemoveUser, spaceSetDefault, spaceView, } from '#schema/space';
6
- import { User, resolveHome, userView } from '#schema/user';
7
- export const ORIGIN = 'shell.astrale.ai';
8
- export const ShellCore = {
9
- nodes: {
10
- admin: adminGroup,
11
- member: memberGroup,
12
- 'default-space': defaultSpace,
13
- },
14
- edges: [...(groupCore.edges ?? []), ...(spaceCore.edges ?? [])],
15
- };
16
- const dependencies = { kernel: KernelSchema };
17
- const functions = { setupAdmin, setupMember };
18
- const classes = {
19
- Group,
20
- Space,
21
- User,
22
- administers_space,
23
- default_space,
24
- member_of_group,
25
- member_of_space,
26
- owns_space,
27
- };
28
- const policies = { belongsToSpace, mayAdministerSpace, maySetupUsers, ownsSpace };
29
- const views = { group: groupView, home: homeView, space: spaceView, user: userView };
30
- export const ShellSchema = defineSchema(ORIGIN, {
31
- dependencies,
32
- functions,
33
- classes,
34
- policies,
35
- views,
36
- core: ShellCore,
37
- });
38
- export const S = schema.resolve(ShellSchema);
39
- export { groupAssignUser, groupUnassignUser, resolveHome, setupAdmin, setupMember, spaceAddUser, spaceRemoveUser, spaceSetDefault, };
@@ -1,323 +0,0 @@
1
- export declare const Group: import("@astrale-os/sdk/schema").NodeClass<{
2
- readonly depth: 1;
3
- readonly abstract: false;
4
- readonly extends: readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
5
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Identity"> & {
6
- readonly origin: "kernel.astrale.ai";
7
- };
8
- readonly kind: 'node';
9
- readonly abstract: true;
10
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Identity"> & {
11
- readonly origin: "kernel.astrale.ai";
12
- }, "kernel.astrale.ai:class.Identity", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
13
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
14
- readonly origin: "kernel.astrale.ai";
15
- };
16
- readonly kind: 'node';
17
- readonly abstract: true;
18
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
19
- readonly origin: "kernel.astrale.ai";
20
- }, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<({
21
- claim: string;
22
- op: "contains";
23
- value: unknown;
24
- } | {
25
- claim: string;
26
- op: "eq";
27
- value: unknown;
28
- } | {
29
- claim: string;
30
- op: "exists";
31
- })[], false, "requiredClaims", "kernel.astrale.ai:class.Identity.property.requiredClaims"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "frozen", "kernel.astrale.ai:class.Identity.property.frozen"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "iss", "kernel.astrale.ai:class.Identity.property.iss"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "sub", "kernel.astrale.ai:class.Identity.property.sub">, import("@astrale-os/sdk/schema").MethodProjection<{
32
- audience: string;
33
- ttlSeconds: number;
34
- attenuation: unknown;
35
- }, {
36
- readonly mode: 'value';
37
- readonly value: string;
38
- }, false, "default", "authenticated", "delegate", "kernel.astrale.ai:class.Identity.method.delegate">, import("@astrale-os/sdk/schema").MethodProjection<Record<string, never>, {
39
- readonly mode: 'value';
40
- readonly value: {
41
- id: string;
42
- issuer: string;
43
- subject: string;
44
- frozen: boolean;
45
- requiredClaims: ({
46
- claim: string;
47
- op: "contains";
48
- value: unknown;
49
- } | {
50
- claim: string;
51
- op: "eq";
52
- value: unknown;
53
- } | {
54
- claim: string;
55
- op: "exists";
56
- })[];
57
- };
58
- }, true, "default", "authenticated", "whoami", "kernel.astrale.ai:class.Identity.method.whoami"> | import("@astrale-os/sdk/schema").MethodProjection<{
59
- policy: string;
60
- object: string;
61
- }, {
62
- readonly mode: 'value';
63
- readonly value: {
64
- allowed: boolean;
65
- };
66
- }, true, "default", "authenticated", "can", "kernel.astrale.ai:class.Identity.method.can"> | import("@astrale-os/sdk/schema").MethodProjection<{
67
- issuer: string;
68
- subject: string;
69
- }, {
70
- readonly mode: 'value';
71
- readonly value: {
72
- id: string;
73
- issuer: string;
74
- subject: string;
75
- frozen: boolean;
76
- requiredClaims: ({
77
- claim: string;
78
- op: "contains";
79
- value: unknown;
80
- } | {
81
- claim: string;
82
- op: "eq";
83
- value: unknown;
84
- } | {
85
- claim: string;
86
- op: "exists";
87
- })[];
88
- } | null;
89
- }, true, "default", "authorized", "whois", "kernel.astrale.ai:class.Identity.method.whois"> | import("@astrale-os/sdk/schema").MethodProjection<{
90
- audience?: string | undefined;
91
- ttlSeconds: number;
92
- grant?: unknown;
93
- }, {
94
- readonly mode: 'value';
95
- readonly value: string;
96
- }, true, "default", "authorized", "mint", "kernel.astrale.ai:class.Identity.method.mint">, import("@astrale-os/sdk/schema").PropertyProjection<({
97
- claim: string;
98
- op: "contains";
99
- value: unknown;
100
- } | {
101
- claim: string;
102
- op: "eq";
103
- value: unknown;
104
- } | {
105
- claim: string;
106
- op: "exists";
107
- })[], false, "requiredClaims", "kernel.astrale.ai:class.Identity.property.requiredClaims"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "frozen", "kernel.astrale.ai:class.Identity.property.frozen"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "iss", "kernel.astrale.ai:class.Identity.property.iss"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "sub", "kernel.astrale.ai:class.Identity.property.sub">, import("@astrale-os/sdk/schema").MethodProjection<{
108
- audience: string;
109
- ttlSeconds: number;
110
- attenuation: unknown;
111
- }, {
112
- readonly mode: 'value';
113
- readonly value: string;
114
- }, false, "default", "authenticated", "delegate", "kernel.astrale.ai:class.Identity.method.delegate">, import("@astrale-os/sdk/schema").MethodProjection<Record<string, never>, {
115
- readonly mode: 'value';
116
- readonly value: {
117
- id: string;
118
- issuer: string;
119
- subject: string;
120
- frozen: boolean;
121
- requiredClaims: ({
122
- claim: string;
123
- op: "contains";
124
- value: unknown;
125
- } | {
126
- claim: string;
127
- op: "eq";
128
- value: unknown;
129
- } | {
130
- claim: string;
131
- op: "exists";
132
- })[];
133
- };
134
- }, true, "default", "authenticated", "whoami", "kernel.astrale.ai:class.Identity.method.whoami"> | import("@astrale-os/sdk/schema").MethodProjection<{
135
- policy: string;
136
- object: string;
137
- }, {
138
- readonly mode: 'value';
139
- readonly value: {
140
- allowed: boolean;
141
- };
142
- }, true, "default", "authenticated", "can", "kernel.astrale.ai:class.Identity.method.can"> | import("@astrale-os/sdk/schema").MethodProjection<{
143
- issuer: string;
144
- subject: string;
145
- }, {
146
- readonly mode: 'value';
147
- readonly value: {
148
- id: string;
149
- issuer: string;
150
- subject: string;
151
- frozen: boolean;
152
- requiredClaims: ({
153
- claim: string;
154
- op: "contains";
155
- value: unknown;
156
- } | {
157
- claim: string;
158
- op: "eq";
159
- value: unknown;
160
- } | {
161
- claim: string;
162
- op: "exists";
163
- })[];
164
- } | null;
165
- }, true, "default", "authorized", "whois", "kernel.astrale.ai:class.Identity.method.whois"> | import("@astrale-os/sdk/schema").MethodProjection<{
166
- audience?: string | undefined;
167
- ttlSeconds: number;
168
- grant?: unknown;
169
- }, {
170
- readonly mode: 'value';
171
- readonly value: string;
172
- }, true, "default", "authorized", "mint", "kernel.astrale.ai:class.Identity.method.mint">>, import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
173
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Named"> & {
174
- readonly origin: "kernel.astrale.ai";
175
- };
176
- readonly kind: 'node';
177
- readonly abstract: true;
178
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Named"> & {
179
- readonly origin: "kernel.astrale.ai";
180
- }, "kernel.astrale.ai:class.Named", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
181
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
182
- readonly origin: "kernel.astrale.ai";
183
- };
184
- readonly kind: 'node';
185
- readonly abstract: true;
186
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
187
- readonly origin: "kernel.astrale.ai";
188
- }, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "name", "kernel.astrale.ai:class.Named.property.name">, never, never, import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "name", "kernel.astrale.ai:class.Named.property.name">, never, never>, import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
189
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Descriptable"> & {
190
- readonly origin: "kernel.astrale.ai";
191
- };
192
- readonly kind: 'node';
193
- readonly abstract: true;
194
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Descriptable"> & {
195
- readonly origin: "kernel.astrale.ai";
196
- }, "kernel.astrale.ai:class.Descriptable", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
197
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
198
- readonly origin: "kernel.astrale.ai";
199
- };
200
- readonly kind: 'node';
201
- readonly abstract: true;
202
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
203
- readonly origin: "kernel.astrale.ai";
204
- }, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "description", "kernel.astrale.ai:class.Descriptable.property.description">, never, never, import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "description", "kernel.astrale.ai:class.Descriptable.property.description">, never, never>];
205
- readonly properties: never;
206
- readonly methods: {
207
- readonly assignUser: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
208
- user: string;
209
- }, {
210
- readonly mode: 'value';
211
- readonly value: import("@astrale-os/sdk/schema").Value;
212
- }, "authorized", false, "default">>;
213
- readonly unassignUser: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
214
- user: string;
215
- }, {
216
- readonly mode: 'value';
217
- readonly value: import("@astrale-os/sdk/schema").Value;
218
- }, "authorized", false, "default">>;
219
- };
220
- readonly effectiveProperties: (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
221
- readonly name: "description";
222
- readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
223
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
224
- readonly name: "frozen";
225
- readonly key: "kernel.astrale.ai:class.Identity.property.frozen";
226
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
227
- readonly name: "iss";
228
- readonly key: "kernel.astrale.ai:class.Identity.property.iss";
229
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
230
- readonly name: "name";
231
- readonly key: "kernel.astrale.ai:class.Named.property.name";
232
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
233
- readonly name: "sub";
234
- readonly key: "kernel.astrale.ai:class.Identity.property.sub";
235
- });
236
- readonly effectiveInstanceMethods: (import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
237
- user: string;
238
- }, {
239
- readonly mode: 'value';
240
- readonly value: import("@astrale-os/sdk/schema").Value;
241
- }, "authorized", false, "default">>, "assignUser", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
242
- user: string;
243
- }, {
244
- readonly mode: 'value';
245
- readonly value: import("@astrale-os/sdk/schema").Value;
246
- }, "authorized", false, "default">>, "unassignUser", "self">) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
247
- audience: string;
248
- ttlSeconds: number;
249
- attenuation: unknown;
250
- }, {
251
- readonly mode: 'value';
252
- readonly value: string;
253
- }, false, "default", "authenticated", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.delegate"> & {
254
- readonly name: "delegate";
255
- });
256
- readonly effectiveStaticMethods: (import("@astrale-os/sdk/schema").ResolvedMethod<{
257
- policy: string;
258
- object: string;
259
- }, {
260
- readonly mode: 'value';
261
- readonly value: {
262
- allowed: boolean;
263
- };
264
- }, true, "default", "authenticated", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.can"> & {
265
- readonly name: "can";
266
- }) | (import("@astrale-os/sdk/schema").ResolvedMethod<Record<string, never>, {
267
- readonly mode: 'value';
268
- readonly value: {
269
- id: string;
270
- issuer: string;
271
- subject: string;
272
- frozen: boolean;
273
- requiredClaims: ({
274
- claim: string;
275
- op: "contains";
276
- value: unknown;
277
- } | {
278
- claim: string;
279
- op: "eq";
280
- value: unknown;
281
- } | {
282
- claim: string;
283
- op: "exists";
284
- })[];
285
- };
286
- }, true, "default", "authenticated", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.whoami"> & {
287
- readonly name: "whoami";
288
- }) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
289
- audience?: string | undefined;
290
- ttlSeconds: number;
291
- grant?: unknown;
292
- }, {
293
- readonly mode: 'value';
294
- readonly value: string;
295
- }, true, "default", "authorized", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.mint"> & {
296
- readonly name: "mint";
297
- }) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
298
- issuer: string;
299
- subject: string;
300
- }, {
301
- readonly mode: 'value';
302
- readonly value: {
303
- id: string;
304
- issuer: string;
305
- subject: string;
306
- frozen: boolean;
307
- requiredClaims: ({
308
- claim: string;
309
- op: "contains";
310
- value: unknown;
311
- } | {
312
- claim: string;
313
- op: "eq";
314
- value: unknown;
315
- } | {
316
- claim: string;
317
- op: "exists";
318
- })[];
319
- } | null;
320
- }, true, "default", "authorized", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.whois"> & {
321
- readonly name: "whois";
322
- });
323
- }>;
@@ -1,7 +0,0 @@
1
- import { K, nodeClass } from '@astrale-os/sdk/schema';
2
- import { groupAssignUser, groupUnassignUser } from './methods.js';
3
- export const Group = nodeClass({
4
- description: 'A named compositional Shell Identity.',
5
- extends: [K.classes.Identity, K.classes.Named, K.classes.Descriptable],
6
- methods: { assignUser: groupAssignUser, unassignUser: groupUnassignUser },
7
- });
@@ -1,10 +0,0 @@
1
- import { type builder } from '@astrale-os/sdk/schema';
2
- export declare const adminGroup: builder.CoreNode;
3
- export declare const memberGroup: builder.CoreNode;
4
- export declare const groupCore: {
5
- nodes: {
6
- admin: builder.CoreNode;
7
- member: builder.CoreNode;
8
- };
9
- edges: never[];
10
- };
@@ -1,14 +0,0 @@
1
- import { K, core } from '@astrale-os/sdk/schema';
2
- import { Group } from './class.js';
3
- const identity = (subject, name, description) => core.node(() => Group, {
4
- [K.classes.Identity.self.properties.iss.key]: 'shell.astrale.ai',
5
- [K.classes.Identity.self.properties.sub.key]: subject,
6
- [K.classes.Named.self.properties.name.key]: name,
7
- [K.classes.Descriptable.self.properties.description.key]: description,
8
- });
9
- export const adminGroup = identity('core.admin', 'Administrators', 'Users entrusted with Shell application-plane administration.');
10
- export const memberGroup = identity('core.member', 'Members', 'Users admitted to the common Shell application plane.');
11
- export const groupCore = {
12
- nodes: { admin: adminGroup, member: memberGroup },
13
- edges: [],
14
- };
@@ -1,6 +0,0 @@
1
- export { Group } from './class.js';
2
- export { adminGroup, groupCore, memberGroup } from './core.js';
3
- export { groupAssignUser, groupUnassignUser } from './methods.js';
4
- export { maySetupUsers } from './policies.js';
5
- export { member_of_group } from './relationships.js';
6
- export { groupView } from './view.js';
@@ -1,6 +0,0 @@
1
- export { Group } from './class.js';
2
- export { adminGroup, groupCore, memberGroup } from './core.js';
3
- export { groupAssignUser, groupUnassignUser } from './methods.js';
4
- export { maySetupUsers } from './policies.js';
5
- export { member_of_group } from './relationships.js';
6
- export { groupView } from './view.js';
@@ -1,13 +0,0 @@
1
- import { type builder } from '@astrale-os/sdk/schema';
2
- export declare const groupAssignUser: builder.Method<builder.CallableProjection<{
3
- user: string;
4
- }, {
5
- readonly mode: 'value';
6
- readonly value: import("@astrale-os/sdk/schema").Value;
7
- }, "authorized", false, "default">>;
8
- export declare const groupUnassignUser: builder.Method<builder.CallableProjection<{
9
- user: string;
10
- }, {
11
- readonly mode: 'value';
12
- readonly value: import("@astrale-os/sdk/schema").Value;
13
- }, "authorized", false, "default">>;
@@ -1,22 +0,0 @@
1
- import { method, path } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- import { User } from '#schema/user';
4
- import { adminGroup } from './core.js';
5
- import { maySetupUsers } from './policies.js';
6
- const emptyObject = {
7
- type: 'object',
8
- properties: {},
9
- additionalProperties: false,
10
- };
11
- const setupPolicy = ({ check, ref }) => check(maySetupUsers, ref(adminGroup));
12
- function membershipMethod(description) {
13
- return method({
14
- description,
15
- input: z.strictObject({ user: path(User) }),
16
- output: emptyObject,
17
- auth: 'authorized',
18
- policy: setupPolicy,
19
- });
20
- }
21
- export const groupAssignUser = membershipMethod('Assign one User to this Group.');
22
- export const groupUnassignUser = membershipMethod('Remove one User from this Group.');
@@ -1 +0,0 @@
1
- export declare const maySetupUsers: import("@astrale-os/sdk/schema").Policy;
@@ -1,6 +0,0 @@
1
- import { policy } from '@astrale-os/sdk/schema';
2
- import { member_of_group } from './relationships.js';
3
- export const maySetupUsers = policy({
4
- description: 'The effective User Grant belongs to the selected Administrators Group.',
5
- match: ({ edge, object, subject }) => edge({ source: subject, class: member_of_group, target: object }),
6
- });
@@ -1,16 +0,0 @@
1
- export declare const member_of_group: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
2
- readonly depth: 0;
3
- readonly abstract: false;
4
- readonly extends: readonly [];
5
- readonly properties: never;
6
- readonly source: {
7
- readonly as: "user";
8
- readonly outgoing: "0..*";
9
- };
10
- readonly target: {
11
- readonly as: "group";
12
- readonly incoming: "0..*";
13
- };
14
- readonly constraints: Record<never, never>;
15
- readonly effectiveProperties: never;
16
- }>;
@@ -1,8 +0,0 @@
1
- import { edgeClass } from '@astrale-os/sdk/schema';
2
- import { User } from '#schema/user';
3
- import { Group } from './class.js';
4
- export const member_of_group = edgeClass.directed({
5
- source: { as: 'user', accepts: [User], outgoing: '0..*' },
6
- target: { as: 'group', accepts: [() => Group], incoming: '0..*' },
7
- description: 'Shell product membership.',
8
- });
@@ -1 +0,0 @@
1
- export declare const groupView: import("@astrale-os/sdk/schema").View;
@@ -1,6 +0,0 @@
1
- import { view } from '@astrale-os/sdk/schema';
2
- import { Group } from './class.js';
3
- export const groupView = view({
4
- description: 'Shell Group membership and administration.',
5
- target: Group,
6
- });
@@ -1 +0,0 @@
1
- export { homeView } from './view.js';
@@ -1 +0,0 @@
1
- export { homeView } from './view.js';
@@ -1 +0,0 @@
1
- export declare const homeView: import("@astrale-os/sdk/schema").View;
@@ -1,4 +0,0 @@
1
- import { view } from '@astrale-os/sdk/schema';
2
- export const homeView = view({
3
- description: 'Shell home and browser-local Space navigation.',
4
- });
@@ -1,28 +0,0 @@
1
- export declare const setupMember: import("@astrale-os/sdk/schema").Function<import("@astrale-os/sdk/schema").CallableProjection<{
2
- operationId: string;
3
- issuer: string;
4
- subject: string;
5
- displayName: string;
6
- personalSpaceName: string;
7
- }, {
8
- readonly mode: 'value';
9
- readonly value: {
10
- userId: string;
11
- personalSpaceId: string;
12
- changed: boolean;
13
- };
14
- }, "authorized", false, "default">>;
15
- export declare const setupAdmin: import("@astrale-os/sdk/schema").Function<import("@astrale-os/sdk/schema").CallableProjection<{
16
- operationId: string;
17
- issuer: string;
18
- subject: string;
19
- displayName: string;
20
- personalSpaceName: string;
21
- }, {
22
- readonly mode: 'value';
23
- readonly value: {
24
- userId: string;
25
- personalSpaceId: string;
26
- changed: boolean;
27
- };
28
- }, "authorized", false, "default">>;
@@ -1,27 +0,0 @@
1
- import { func, fullMatch } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- import { adminGroup, maySetupUsers } from '#schema/group';
4
- const operationId = z.string().min(1).max(256).check(fullMatch('[A-Za-z0-9][A-Za-z0-9._:-]{0,255}'));
5
- const input = z.strictObject({
6
- operationId,
7
- issuer: z.string().min(1).max(2_048),
8
- subject: z.string().min(1).max(2_048),
9
- displayName: z.string().min(1).max(160),
10
- personalSpaceName: z.string().min(1).max(160),
11
- });
12
- const output = z.strictObject({
13
- userId: z.string().min(1),
14
- personalSpaceId: z.string().min(1),
15
- changed: z.boolean(),
16
- });
17
- function setup(description) {
18
- return func({
19
- description,
20
- auth: 'authorized',
21
- input,
22
- output,
23
- policy: ({ check, ref }) => check(maySetupUsers, ref(adminGroup)),
24
- });
25
- }
26
- export const setupMember = setup('Converge one asserted external identity as a Shell member.');
27
- export const setupAdmin = setup('Converge one asserted external identity as a Shell administrator.');
@@ -1 +0,0 @@
1
- export { setupAdmin, setupMember } from './functions.js';
@@ -1 +0,0 @@
1
- export { setupAdmin, setupMember } from './functions.js';