@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,80 +0,0 @@
1
- export declare const Space: 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<"Named"> & {
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<"Named"> & {
11
- readonly origin: "kernel.astrale.ai";
12
- }, "kernel.astrale.ai:class.Named", 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<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 & {
21
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Descriptable"> & {
22
- readonly origin: "kernel.astrale.ai";
23
- };
24
- readonly kind: 'node';
25
- readonly abstract: true;
26
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Descriptable"> & {
27
- readonly origin: "kernel.astrale.ai";
28
- }, "kernel.astrale.ai:class.Descriptable", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
29
- readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
30
- readonly origin: "kernel.astrale.ai";
31
- };
32
- readonly kind: 'node';
33
- readonly abstract: true;
34
- }, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
35
- readonly origin: "kernel.astrale.ai";
36
- }, "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>];
37
- readonly properties: never;
38
- readonly methods: {
39
- readonly addUser: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
40
- user: string;
41
- access: "admin" | "member";
42
- }, {
43
- readonly mode: 'value';
44
- readonly value: import("@astrale-os/sdk/schema").Value;
45
- }, "authorized", false, "default">>;
46
- readonly removeUser: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
47
- user: string;
48
- }, {
49
- readonly mode: 'value';
50
- readonly value: import("@astrale-os/sdk/schema").Value;
51
- }, "authorized", false, "default">>;
52
- readonly setDefault: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<import("@astrale-os/sdk/schema").Value, {
53
- readonly mode: 'value';
54
- readonly value: import("@astrale-os/sdk/schema").Value;
55
- }, "authorized", false, "default">>;
56
- };
57
- readonly effectiveProperties: (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
58
- readonly name: "description";
59
- readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
60
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
61
- readonly name: "name";
62
- readonly key: "kernel.astrale.ai:class.Named.property.name";
63
- });
64
- readonly effectiveInstanceMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
65
- user: string;
66
- access: "admin" | "member";
67
- }, {
68
- readonly mode: 'value';
69
- readonly value: import("@astrale-os/sdk/schema").Value;
70
- }, "authorized", false, "default">>, "addUser", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
71
- user: string;
72
- }, {
73
- readonly mode: 'value';
74
- readonly value: import("@astrale-os/sdk/schema").Value;
75
- }, "authorized", false, "default">>, "removeUser", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<import("@astrale-os/sdk/schema").Value, {
76
- readonly mode: 'value';
77
- readonly value: import("@astrale-os/sdk/schema").Value;
78
- }, "authorized", false, "default">>, "setDefault", "self">;
79
- readonly effectiveStaticMethods: never;
80
- }>;
@@ -1,11 +0,0 @@
1
- import { K, nodeClass } from '@astrale-os/sdk/schema';
2
- import { spaceAddUser, spaceRemoveUser, spaceSetDefault } from './methods.js';
3
- export const Space = nodeClass({
4
- description: 'A named Shell collaboration boundary.',
5
- extends: [K.classes.Named, K.classes.Descriptable],
6
- methods: {
7
- addUser: spaceAddUser,
8
- removeUser: spaceRemoveUser,
9
- setDefault: spaceSetDefault,
10
- },
11
- });
@@ -1,8 +0,0 @@
1
- import { type builder } from '@astrale-os/sdk/schema';
2
- export declare const defaultSpace: builder.CoreNode;
3
- export declare const spaceCore: {
4
- nodes: {
5
- 'default-space': builder.CoreNode;
6
- };
7
- edges: builder.CoreEdge[];
8
- };
@@ -1,15 +0,0 @@
1
- import { K, core } from '@astrale-os/sdk/schema';
2
- import { adminGroup, memberGroup } from '#schema/group';
3
- import { Space } from './class.js';
4
- import { member_of_space, owns_space } from './relationships.js';
5
- export const defaultSpace = core.node(Space, {
6
- [K.classes.Named.self.properties.name.key]: 'Default Space',
7
- [K.classes.Descriptable.self.properties.description.key]: 'The common Space installed with Shell.',
8
- });
9
- export const spaceCore = {
10
- nodes: { 'default-space': defaultSpace },
11
- edges: [
12
- core.edge(adminGroup, owns_space, defaultSpace, {}),
13
- core.edge(memberGroup, member_of_space, defaultSpace, {}),
14
- ],
15
- };
@@ -1,6 +0,0 @@
1
- export { Space } from './class.js';
2
- export { defaultSpace, spaceCore } from './core.js';
3
- export { spaceAddUser, spaceRemoveUser, spaceSetDefault } from './methods.js';
4
- export { belongsToSpace, mayAdministerSpace, ownsSpace } from './policies.js';
5
- export { administers_space, default_space, member_of_space, owns_space } from './relationships.js';
6
- export { spaceView } from './view.js';
@@ -1,6 +0,0 @@
1
- export { Space } from './class.js';
2
- export { defaultSpace, spaceCore } from './core.js';
3
- export { spaceAddUser, spaceRemoveUser, spaceSetDefault } from './methods.js';
4
- export { belongsToSpace, mayAdministerSpace, ownsSpace } from './policies.js';
5
- export { administers_space, default_space, member_of_space, owns_space } from './relationships.js';
6
- export { spaceView } from './view.js';
@@ -1,18 +0,0 @@
1
- import { type builder } from '@astrale-os/sdk/schema';
2
- export declare const spaceAddUser: builder.Method<builder.CallableProjection<{
3
- user: string;
4
- access: "admin" | "member";
5
- }, {
6
- readonly mode: 'value';
7
- readonly value: import("@astrale-os/sdk/schema").Value;
8
- }, "authorized", false, "default">>;
9
- export declare const spaceRemoveUser: builder.Method<builder.CallableProjection<{
10
- user: string;
11
- }, {
12
- readonly mode: 'value';
13
- readonly value: import("@astrale-os/sdk/schema").Value;
14
- }, "authorized", false, "default">>;
15
- export declare const spaceSetDefault: builder.Method<builder.CallableProjection<import("@astrale-os/sdk/schema").Value, {
16
- readonly mode: 'value';
17
- readonly value: import("@astrale-os/sdk/schema").Value;
18
- }, "authorized", false, "default">>;
@@ -1,32 +0,0 @@
1
- import { method, path } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- import { User } from '#schema/user';
4
- import { belongsToSpace, mayAdministerSpace } from './policies.js';
5
- const emptyObject = {
6
- type: 'object',
7
- properties: {},
8
- additionalProperties: false,
9
- };
10
- const administerPolicy = ({ check, self }) => check(mayAdministerSpace, self);
11
- const membershipPolicy = ({ check, self }) => check(belongsToSpace, self);
12
- export const spaceAddUser = method({
13
- description: 'Set one User direct member or admin access.',
14
- input: z.strictObject({ user: path(User), access: z.enum(['member', 'admin']) }),
15
- output: emptyObject,
16
- auth: 'authorized',
17
- policy: administerPolicy,
18
- });
19
- export const spaceRemoveUser = method({
20
- description: 'Remove one User direct access.',
21
- input: z.strictObject({ user: path(User) }),
22
- output: emptyObject,
23
- auth: 'authorized',
24
- policy: administerPolicy,
25
- });
26
- export const spaceSetDefault = method({
27
- description: 'Set this accessible Space as the granted User fallback.',
28
- input: emptyObject,
29
- output: emptyObject,
30
- auth: 'authorized',
31
- policy: membershipPolicy,
32
- });
@@ -1,4 +0,0 @@
1
- import type { builder } from '@astrale-os/sdk/schema';
2
- export declare const ownsSpace: builder.Policy;
3
- export declare const mayAdministerSpace: builder.Policy;
4
- export declare const belongsToSpace: builder.Policy;
@@ -1,21 +0,0 @@
1
- import { policy } from '@astrale-os/sdk/schema';
2
- import { Group, member_of_group } from '#schema/group';
3
- import { administers_space, member_of_space, owns_space } from './relationships.js';
4
- export const ownsSpace = policy({
5
- description: 'The effective User Grant directly or transitively owns this Space.',
6
- match: ({ allOf, anyOf, edge, exists, object, subject }) => anyOf(edge({ source: subject, class: owns_space, target: object }), groupSpaceBranch({ allOf, edge, exists, object, subject }, owns_space)),
7
- });
8
- export const mayAdministerSpace = policy({
9
- description: 'The effective User Grant directly or transitively administers this Space.',
10
- match: ({ allOf, anyOf, edge, exists, object, subject }) => anyOf(edge({ source: subject, class: owns_space, target: object }), edge({ source: subject, class: administers_space, target: object }), groupSpaceBranch({ allOf, edge, exists, object, subject }, owns_space), groupSpaceBranch({ allOf, edge, exists, object, subject }, administers_space)),
11
- });
12
- export const belongsToSpace = policy({
13
- description: 'The effective User Grant has direct or Group-derived access to this Space.',
14
- match: ({ allOf, anyOf, edge, exists, object, subject }) => anyOf(edge({ source: subject, class: owns_space, target: object }), edge({ source: subject, class: administers_space, target: object }), edge({ source: subject, class: member_of_space, target: object }), groupSpaceBranch({ allOf, edge, exists, object, subject }, owns_space), groupSpaceBranch({ allOf, edge, exists, object, subject }, administers_space), groupSpaceBranch({ allOf, edge, exists, object, subject }, member_of_space)),
15
- });
16
- function groupSpaceBranch(context, access) {
17
- return context.exists(({ node }) => {
18
- const group = node(Group);
19
- return context.allOf(context.edge({ source: context.subject, class: member_of_group, target: group }), context.edge({ source: group, class: access, target: context.object }));
20
- });
21
- }
@@ -1,64 +0,0 @@
1
- export declare const owns_space: 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: "owner";
8
- readonly outgoing: "0..*";
9
- };
10
- readonly target: {
11
- readonly as: "space";
12
- readonly incoming: "1";
13
- };
14
- readonly constraints: Record<never, never>;
15
- readonly effectiveProperties: never;
16
- }>;
17
- export declare const administers_space: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
18
- readonly depth: 0;
19
- readonly abstract: false;
20
- readonly extends: readonly [];
21
- readonly properties: never;
22
- readonly source: {
23
- readonly as: "admin";
24
- readonly outgoing: "0..*";
25
- };
26
- readonly target: {
27
- readonly as: "space";
28
- readonly incoming: "0..*";
29
- };
30
- readonly constraints: Record<never, never>;
31
- readonly effectiveProperties: never;
32
- }>;
33
- export declare const member_of_space: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
34
- readonly depth: 0;
35
- readonly abstract: false;
36
- readonly extends: readonly [];
37
- readonly properties: never;
38
- readonly source: {
39
- readonly as: "member";
40
- readonly outgoing: "0..*";
41
- };
42
- readonly target: {
43
- readonly as: "space";
44
- readonly incoming: "0..*";
45
- };
46
- readonly constraints: Record<never, never>;
47
- readonly effectiveProperties: never;
48
- }>;
49
- export declare const default_space: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
50
- readonly depth: 0;
51
- readonly abstract: false;
52
- readonly extends: readonly [];
53
- readonly properties: never;
54
- readonly source: {
55
- readonly as: "user";
56
- readonly outgoing: "0..1";
57
- };
58
- readonly target: {
59
- readonly as: "space";
60
- readonly incoming: "0..*";
61
- };
62
- readonly constraints: Record<never, never>;
63
- readonly effectiveProperties: never;
64
- }>;
@@ -1,24 +0,0 @@
1
- import { edgeClass } from '@astrale-os/sdk/schema';
2
- import { Group } from '#schema/group';
3
- import { User } from '#schema/user';
4
- import { Space } from './class.js';
5
- export const owns_space = edgeClass.directed({
6
- source: { as: 'owner', accepts: [User, Group], outgoing: '0..*' },
7
- target: { as: 'space', accepts: [() => Space], incoming: '1' },
8
- description: 'The unique owner of a Space.',
9
- });
10
- export const administers_space = edgeClass.directed({
11
- source: { as: 'admin', accepts: [User, Group], outgoing: '0..*' },
12
- target: { as: 'space', accepts: [() => Space], incoming: '0..*' },
13
- description: 'Direct Space administration.',
14
- });
15
- export const member_of_space = edgeClass.directed({
16
- source: { as: 'member', accepts: [User, Group], outgoing: '0..*' },
17
- target: { as: 'space', accepts: [() => Space], incoming: '0..*' },
18
- description: 'Direct Space membership.',
19
- });
20
- export const default_space = edgeClass.directed({
21
- source: { as: 'user', accepts: [User], outgoing: '0..1' },
22
- target: { as: 'space', accepts: [() => Space], incoming: '0..*' },
23
- description: 'One User persisted fallback Space.',
24
- });
@@ -1 +0,0 @@
1
- export declare const spaceView: import("@astrale-os/sdk/schema").View;
@@ -1,6 +0,0 @@
1
- import { view } from '@astrale-os/sdk/schema';
2
- import { Space } from './class.js';
3
- export const spaceView = view({
4
- description: 'Shell Space ownership, administration, and membership.',
5
- target: Space,
6
- });
@@ -1,278 +0,0 @@
1
- export declare const User: 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">>];
173
- readonly properties: {
174
- readonly displayName: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "displayName", "self">;
175
- };
176
- readonly methods: {
177
- readonly resolveHome: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
178
- readonly mode: 'value';
179
- readonly value: {
180
- userId: string;
181
- personalSpaceId: string | null;
182
- };
183
- }, "authenticated", false, "default">>;
184
- };
185
- readonly effectiveProperties: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "displayName", "self"> | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
186
- readonly name: "frozen";
187
- readonly key: "kernel.astrale.ai:class.Identity.property.frozen";
188
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
189
- readonly name: "iss";
190
- readonly key: "kernel.astrale.ai:class.Identity.property.iss";
191
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
192
- readonly name: "sub";
193
- readonly key: "kernel.astrale.ai:class.Identity.property.sub";
194
- });
195
- readonly effectiveInstanceMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
196
- readonly mode: 'value';
197
- readonly value: {
198
- userId: string;
199
- personalSpaceId: string | null;
200
- };
201
- }, "authenticated", false, "default">>, "resolveHome", "self"> | (import("@astrale-os/sdk/schema").ResolvedMethod<{
202
- audience: string;
203
- ttlSeconds: number;
204
- attenuation: unknown;
205
- }, {
206
- readonly mode: 'value';
207
- readonly value: string;
208
- }, 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"> & {
209
- readonly name: "delegate";
210
- });
211
- readonly effectiveStaticMethods: (import("@astrale-os/sdk/schema").ResolvedMethod<Record<string, never>, {
212
- readonly mode: 'value';
213
- readonly value: {
214
- id: string;
215
- issuer: string;
216
- subject: string;
217
- frozen: boolean;
218
- requiredClaims: ({
219
- claim: string;
220
- op: "contains";
221
- value: unknown;
222
- } | {
223
- claim: string;
224
- op: "eq";
225
- value: unknown;
226
- } | {
227
- claim: string;
228
- op: "exists";
229
- })[];
230
- };
231
- }, 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"> & {
232
- readonly name: "whoami";
233
- }) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
234
- policy: string;
235
- object: string;
236
- }, {
237
- readonly mode: 'value';
238
- readonly value: {
239
- allowed: boolean;
240
- };
241
- }, 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"> & {
242
- readonly name: "can";
243
- }) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
244
- issuer: string;
245
- subject: string;
246
- }, {
247
- readonly mode: 'value';
248
- readonly value: {
249
- id: string;
250
- issuer: string;
251
- subject: string;
252
- frozen: boolean;
253
- requiredClaims: ({
254
- claim: string;
255
- op: "contains";
256
- value: unknown;
257
- } | {
258
- claim: string;
259
- op: "eq";
260
- value: unknown;
261
- } | {
262
- claim: string;
263
- op: "exists";
264
- })[];
265
- } | null;
266
- }, 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"> & {
267
- readonly name: "whois";
268
- }) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
269
- audience?: string | undefined;
270
- ttlSeconds: number;
271
- grant?: unknown;
272
- }, {
273
- readonly mode: 'value';
274
- readonly value: string;
275
- }, 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"> & {
276
- readonly name: "mint";
277
- });
278
- }>;
@@ -1,11 +0,0 @@
1
- import { K, nodeClass, property } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- import { resolveHome } from './methods.js';
4
- export const User = nodeClass({
5
- description: 'One externally identified person using Shell.',
6
- extends: [K.classes.Identity],
7
- properties: {
8
- displayName: property(z.string().min(1).max(160), { required: false }),
9
- },
10
- methods: { resolveHome },
11
- });
@@ -1,3 +0,0 @@
1
- export { User } from './class.js';
2
- export { resolveHome } from './methods.js';
3
- export { userView } from './view.js';
@@ -1,3 +0,0 @@
1
- export { User } from './class.js';
2
- export { resolveHome } from './methods.js';
3
- export { userView } from './view.js';
@@ -1,7 +0,0 @@
1
- export declare const resolveHome: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
2
- readonly mode: 'value';
3
- readonly value: {
4
- userId: string;
5
- personalSpaceId: string | null;
6
- };
7
- }, "authenticated", false, "default">>;
@@ -1,11 +0,0 @@
1
- import { method } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- export const resolveHome = method({
4
- description: 'Resolve this User and its canonical personal Space.',
5
- auth: 'authenticated',
6
- input: z.strictObject({}),
7
- output: z.strictObject({
8
- userId: z.string().min(1),
9
- personalSpaceId: z.string().min(1).nullable(),
10
- }),
11
- });
@@ -1 +0,0 @@
1
- export declare const userView: import("@astrale-os/sdk/schema").View;