@astrale-domains/shell 0.1.0-beta.4 → 0.1.0-beta.41
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.
- package/README.md +143 -64
- package/dist/domain.d.ts +99 -0
- package/dist/domain.js +77 -0
- package/dist/functions/application/index.js +1 -3
- package/dist/functions/application/list-entrypoints.js +4 -0
- package/dist/functions/group/assign-member-to-group.js +4 -0
- package/dist/functions/group/change-group-membership.js +34 -0
- package/dist/functions/group/group-membership-errors.js +23 -0
- package/dist/functions/group/index.js +2 -3
- package/dist/functions/group/unassign-member-from-group.js +4 -0
- package/dist/functions/user/index.js +1 -3
- package/dist/functions/user/invite-user.js +39 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -4
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.js +1 -0
- package/dist/integrations/integrations.d.ts +9 -0
- package/dist/integrations/integrations.js +2 -0
- package/dist/integrations/user-invitation/index.d.ts +4 -0
- package/dist/integrations/user-invitation/index.js +3 -0
- package/dist/integrations/user-invitation/invitation-request-failure.d.ts +5 -0
- package/dist/integrations/user-invitation/invitation-request-failure.js +9 -0
- package/dist/integrations/user-invitation/invite-user-request.d.ts +6 -0
- package/dist/integrations/user-invitation/invite-user-request.js +1 -0
- package/dist/integrations/user-invitation/request-user-invitation.d.ts +8 -0
- package/dist/integrations/user-invitation/request-user-invitation.js +9 -0
- package/dist/mutations/group/index.js +1 -2
- package/dist/mutations/group/set-group-membership.js +29 -0
- package/dist/providers/admin-enrollment/create-admin-enrollment-provider.js +78 -0
- package/dist/providers/admin-enrollment/decode-admin-invitation-response.js +20 -0
- package/dist/providers/admin-enrollment/index.js +1 -0
- package/dist/providers/admin-enrollment/read-enrollment-response.js +34 -0
- package/dist/queries/application/index.js +1 -3
- package/dist/queries/application/read-installed-entrypoints.js +44 -0
- package/dist/queries/group/index.js +2 -3
- package/dist/queries/group/read-group-membership-endpoints.js +18 -0
- package/dist/queries/group/read-group-membership.js +35 -0
- package/dist/runtime.d.ts +462 -0
- package/dist/runtime.js +16 -0
- package/dist/schema/index.d.ts +5 -7
- package/dist/schema/index.js +4 -7
- package/dist/schema/modules/application/functions/index.d.ts +1 -0
- package/dist/schema/modules/application/functions/index.js +1 -0
- package/dist/schema/modules/application/functions/list-entrypoints.d.ts +15 -0
- package/dist/schema/modules/application/functions/list-entrypoints.js +16 -0
- package/dist/schema/modules/application/index.d.ts +2 -0
- package/dist/schema/modules/application/index.js +2 -0
- package/dist/schema/modules/application/types/entrypoint-entry.d.ts +8 -0
- package/dist/schema/modules/application/types/entrypoint-entry.js +7 -0
- package/dist/schema/modules/application/types/index.d.ts +1 -0
- package/dist/schema/modules/application/types/index.js +1 -0
- package/dist/schema/modules/group/classes/group.d.ts +20 -0
- package/dist/schema/modules/group/classes/group.js +8 -0
- package/dist/schema/modules/group/classes/index.d.ts +2 -0
- package/dist/schema/modules/group/classes/index.js +2 -0
- package/dist/schema/modules/group/classes/member-of-group.d.ts +16 -0
- package/dist/schema/modules/group/classes/member-of-group.js +11 -0
- package/dist/schema/modules/group/core/administrators-group.d.ts +1 -0
- package/dist/schema/modules/group/core/administrators-group.js +6 -0
- package/dist/schema/modules/group/core/applications-group.d.ts +1 -0
- package/dist/schema/modules/group/core/applications-group.js +6 -0
- package/dist/schema/modules/group/core/index.d.ts +3 -0
- package/dist/schema/modules/group/core/index.js +3 -0
- package/dist/schema/modules/group/core/members-group.d.ts +1 -0
- package/dist/schema/modules/group/core/members-group.js +6 -0
- package/dist/schema/modules/group/functions/assign-member-to-group.js +11 -0
- package/dist/schema/modules/group/functions/index.js +2 -0
- package/dist/schema/modules/group/functions/unassign-member-from-group.js +11 -0
- package/dist/schema/modules/group/index.d.ts +3 -0
- package/dist/schema/modules/group/index.js +3 -0
- package/dist/schema/modules/group/policies/belongs-to-group.d.ts +1 -0
- package/dist/schema/modules/group/policies/belongs-to-group.js +5 -0
- package/dist/schema/modules/group/policies/index.d.ts +1 -0
- package/dist/schema/modules/group/policies/index.js +1 -0
- package/dist/schema/modules/group/types/group-membership-input.js +8 -0
- package/dist/schema/modules/group/types/index.js +1 -0
- package/dist/schema/modules/user/classes/index.d.ts +1 -0
- package/dist/schema/modules/user/classes/index.js +1 -0
- package/dist/schema/modules/user/classes/user.d.ts +21 -0
- package/dist/schema/modules/user/classes/user.js +12 -0
- package/dist/schema/modules/user/functions/index.js +1 -0
- package/dist/schema/modules/user/functions/invite-user.js +12 -0
- package/dist/schema/modules/user/index.d.ts +2 -0
- package/dist/schema/modules/user/index.js +2 -0
- package/dist/schema/modules/user/types/index.d.ts +1 -0
- package/dist/schema/modules/user/types/index.js +1 -0
- package/dist/schema/modules/user/types/invitation-summary.d.ts +16 -0
- package/dist/schema/modules/user/types/invitation-summary.js +15 -0
- package/dist/schema/policies/administers-shell-class.js +11 -0
- package/dist/schema/policies/index.js +3 -0
- package/dist/schema/policies/owns-class.js +7 -0
- package/dist/schema/policies/uses-function.js +5 -0
- package/dist/schema/schema.d.ts +342 -0
- package/dist/schema/schema.js +27 -0
- package/dist/schema/views/application-view.js +4 -0
- package/dist/schema/views/index.js +1 -0
- package/dist/utils/canonical-node-path/index.js +1 -0
- package/dist/utils/canonical-node-path/parse-canonical-node-path.js +8 -0
- package/package.json +51 -30
- package/dist/functions/application/index.d.ts +0 -3
- package/dist/functions/application/index.d.ts.map +0 -1
- package/dist/functions/application/index.js.map +0 -1
- package/dist/functions/application/install.d.ts +0 -4
- package/dist/functions/application/install.d.ts.map +0 -1
- package/dist/functions/application/install.js +0 -11
- package/dist/functions/application/install.js.map +0 -1
- package/dist/functions/application/uninstall.d.ts +0 -5
- package/dist/functions/application/uninstall.d.ts.map +0 -1
- package/dist/functions/application/uninstall.js +0 -11
- package/dist/functions/application/uninstall.js.map +0 -1
- package/dist/functions/execution/index.d.ts +0 -15
- package/dist/functions/execution/index.d.ts.map +0 -1
- package/dist/functions/execution/index.js +0 -2
- package/dist/functions/execution/index.js.map +0 -1
- package/dist/functions/group/assign-user.d.ts +0 -5
- package/dist/functions/group/assign-user.d.ts.map +0 -1
- package/dist/functions/group/assign-user.js +0 -11
- package/dist/functions/group/assign-user.js.map +0 -1
- package/dist/functions/group/index.d.ts +0 -3
- package/dist/functions/group/index.d.ts.map +0 -1
- package/dist/functions/group/index.js.map +0 -1
- package/dist/functions/group/unassign-user.d.ts +0 -5
- package/dist/functions/group/unassign-user.d.ts.map +0 -1
- package/dist/functions/group/unassign-user.js +0 -11
- package/dist/functions/group/unassign-user.js.map +0 -1
- package/dist/functions/index.d.ts +0 -6
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/functions/index.js +0 -6
- package/dist/functions/index.js.map +0 -1
- package/dist/functions/space/add-user.d.ts +0 -5
- package/dist/functions/space/add-user.d.ts.map +0 -1
- package/dist/functions/space/add-user.js +0 -11
- package/dist/functions/space/add-user.js.map +0 -1
- package/dist/functions/space/index.d.ts +0 -4
- package/dist/functions/space/index.d.ts.map +0 -1
- package/dist/functions/space/index.js +0 -4
- package/dist/functions/space/index.js.map +0 -1
- package/dist/functions/space/remove-user.d.ts +0 -5
- package/dist/functions/space/remove-user.d.ts.map +0 -1
- package/dist/functions/space/remove-user.js +0 -11
- package/dist/functions/space/remove-user.js.map +0 -1
- package/dist/functions/space/set-default.d.ts +0 -6
- package/dist/functions/space/set-default.d.ts.map +0 -1
- package/dist/functions/space/set-default.js +0 -11
- package/dist/functions/space/set-default.js.map +0 -1
- package/dist/functions/user/administrator.d.ts +0 -4
- package/dist/functions/user/administrator.d.ts.map +0 -1
- package/dist/functions/user/administrator.js +0 -39
- package/dist/functions/user/administrator.js.map +0 -1
- package/dist/functions/user/ensure.d.ts +0 -18
- package/dist/functions/user/ensure.d.ts.map +0 -1
- package/dist/functions/user/ensure.js +0 -49
- package/dist/functions/user/ensure.js.map +0 -1
- package/dist/functions/user/index.d.ts +0 -3
- package/dist/functions/user/index.d.ts.map +0 -1
- package/dist/functions/user/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mutations/application/association.d.ts +0 -14
- package/dist/mutations/application/association.d.ts.map +0 -1
- package/dist/mutations/application/association.js +0 -46
- package/dist/mutations/application/association.js.map +0 -1
- package/dist/mutations/application/errors.d.ts +0 -5
- package/dist/mutations/application/errors.d.ts.map +0 -1
- package/dist/mutations/application/errors.js +0 -2
- package/dist/mutations/application/errors.js.map +0 -1
- package/dist/mutations/application/index.d.ts +0 -4
- package/dist/mutations/application/index.d.ts.map +0 -1
- package/dist/mutations/application/index.js +0 -3
- package/dist/mutations/application/index.js.map +0 -1
- package/dist/mutations/application/removal.d.ts +0 -6
- package/dist/mutations/application/removal.d.ts.map +0 -1
- package/dist/mutations/application/removal.js +0 -17
- package/dist/mutations/application/removal.js.map +0 -1
- package/dist/mutations/group/errors.d.ts +0 -5
- package/dist/mutations/group/errors.d.ts.map +0 -1
- package/dist/mutations/group/errors.js +0 -2
- package/dist/mutations/group/errors.js.map +0 -1
- package/dist/mutations/group/index.d.ts +0 -3
- package/dist/mutations/group/index.d.ts.map +0 -1
- package/dist/mutations/group/index.js.map +0 -1
- package/dist/mutations/group/membership.d.ts +0 -26
- package/dist/mutations/group/membership.d.ts.map +0 -1
- package/dist/mutations/group/membership.js +0 -71
- package/dist/mutations/group/membership.js.map +0 -1
- package/dist/mutations/index.d.ts +0 -4
- package/dist/mutations/index.d.ts.map +0 -1
- package/dist/mutations/index.js +0 -4
- package/dist/mutations/index.js.map +0 -1
- package/dist/mutations/space/access.d.ts +0 -30
- package/dist/mutations/space/access.d.ts.map +0 -1
- package/dist/mutations/space/access.js +0 -54
- package/dist/mutations/space/access.js.map +0 -1
- package/dist/mutations/space/default.d.ts +0 -26
- package/dist/mutations/space/default.d.ts.map +0 -1
- package/dist/mutations/space/default.js +0 -46
- package/dist/mutations/space/default.js.map +0 -1
- package/dist/mutations/space/errors.d.ts +0 -5
- package/dist/mutations/space/errors.d.ts.map +0 -1
- package/dist/mutations/space/errors.js +0 -2
- package/dist/mutations/space/errors.js.map +0 -1
- package/dist/mutations/space/index.d.ts +0 -4
- package/dist/mutations/space/index.d.ts.map +0 -1
- package/dist/mutations/space/index.js +0 -3
- package/dist/mutations/space/index.js.map +0 -1
- package/dist/mutations/user/index.d.ts +0 -1
- package/dist/mutations/user/index.d.ts.map +0 -1
- package/dist/mutations/user/index.js +0 -2
- package/dist/mutations/user/index.js.map +0 -1
- package/dist/public.d.ts +0 -5
- package/dist/public.d.ts.map +0 -1
- package/dist/public.js +0 -154
- package/dist/public.js.map +0 -1
- package/dist/queries/application/association.d.ts +0 -18
- package/dist/queries/application/association.d.ts.map +0 -1
- package/dist/queries/application/association.js +0 -82
- package/dist/queries/application/association.js.map +0 -1
- package/dist/queries/application/identity.d.ts +0 -4
- package/dist/queries/application/identity.d.ts.map +0 -1
- package/dist/queries/application/identity.js +0 -41
- package/dist/queries/application/identity.js.map +0 -1
- package/dist/queries/application/index.d.ts +0 -3
- package/dist/queries/application/index.d.ts.map +0 -1
- package/dist/queries/application/index.js.map +0 -1
- package/dist/queries/group/identity.d.ts +0 -3
- package/dist/queries/group/identity.d.ts.map +0 -1
- package/dist/queries/group/identity.js +0 -29
- package/dist/queries/group/identity.js.map +0 -1
- package/dist/queries/group/index.d.ts +0 -3
- package/dist/queries/group/index.d.ts.map +0 -1
- package/dist/queries/group/index.js.map +0 -1
- package/dist/queries/group/membership.d.ts +0 -17
- package/dist/queries/group/membership.d.ts.map +0 -1
- package/dist/queries/group/membership.js +0 -47
- package/dist/queries/group/membership.js.map +0 -1
- package/dist/queries/index.d.ts +0 -4
- package/dist/queries/index.d.ts.map +0 -1
- package/dist/queries/index.js +0 -4
- package/dist/queries/index.js.map +0 -1
- package/dist/queries/space/access.d.ts +0 -24
- package/dist/queries/space/access.d.ts.map +0 -1
- package/dist/queries/space/access.js +0 -93
- package/dist/queries/space/access.js.map +0 -1
- package/dist/queries/space/default.d.ts +0 -10
- package/dist/queries/space/default.d.ts.map +0 -1
- package/dist/queries/space/default.js +0 -25
- package/dist/queries/space/default.js.map +0 -1
- package/dist/queries/space/index.d.ts +0 -3
- package/dist/queries/space/index.d.ts.map +0 -1
- package/dist/queries/space/index.js +0 -3
- package/dist/queries/space/index.js.map +0 -1
- package/dist/rules/application/association.d.ts +0 -13
- package/dist/rules/application/association.d.ts.map +0 -1
- package/dist/rules/application/association.js +0 -10
- package/dist/rules/application/association.js.map +0 -1
- package/dist/rules/application/index.d.ts +0 -4
- package/dist/rules/application/index.d.ts.map +0 -1
- package/dist/rules/application/index.js +0 -4
- package/dist/rules/application/index.js.map +0 -1
- package/dist/rules/application/removal.d.ts +0 -11
- package/dist/rules/application/removal.d.ts.map +0 -1
- package/dist/rules/application/removal.js +0 -6
- package/dist/rules/application/removal.js.map +0 -1
- package/dist/rules/application/result.d.ts +0 -8
- package/dist/rules/application/result.d.ts.map +0 -1
- package/dist/rules/application/result.js +0 -17
- package/dist/rules/application/result.js.map +0 -1
- package/dist/rules/group/index.d.ts +0 -2
- package/dist/rules/group/index.d.ts.map +0 -1
- package/dist/rules/group/index.js +0 -2
- package/dist/rules/group/index.js.map +0 -1
- package/dist/rules/group/membership.d.ts +0 -5
- package/dist/rules/group/membership.d.ts.map +0 -1
- package/dist/rules/group/membership.js +0 -12
- package/dist/rules/group/membership.js.map +0 -1
- package/dist/rules/index.d.ts +0 -5
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -5
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/space/access.d.ts +0 -8
- package/dist/rules/space/access.d.ts.map +0 -1
- package/dist/rules/space/access.js +0 -18
- package/dist/rules/space/access.js.map +0 -1
- package/dist/rules/space/default.d.ts +0 -4
- package/dist/rules/space/default.d.ts.map +0 -1
- package/dist/rules/space/default.js +0 -7
- package/dist/rules/space/default.js.map +0 -1
- package/dist/rules/space/index.d.ts +0 -3
- package/dist/rules/space/index.d.ts.map +0 -1
- package/dist/rules/space/index.js +0 -3
- package/dist/rules/space/index.js.map +0 -1
- package/dist/rules/user/ensure.d.ts +0 -21
- package/dist/rules/user/ensure.d.ts.map +0 -1
- package/dist/rules/user/ensure.js +0 -61
- package/dist/rules/user/ensure.js.map +0 -1
- package/dist/rules/user/grant.d.ts +0 -13
- package/dist/rules/user/grant.d.ts.map +0 -1
- package/dist/rules/user/grant.js +0 -12
- package/dist/rules/user/grant.js.map +0 -1
- package/dist/rules/user/index.d.ts +0 -3
- package/dist/rules/user/index.d.ts.map +0 -1
- package/dist/rules/user/index.js +0 -3
- package/dist/rules/user/index.js.map +0 -1
- package/dist/schema/application/class.d.ts +0 -152
- package/dist/schema/application/class.d.ts.map +0 -1
- package/dist/schema/application/class.js +0 -10
- package/dist/schema/application/class.js.map +0 -1
- package/dist/schema/application/core.d.ts +0 -159
- package/dist/schema/application/core.d.ts.map +0 -1
- package/dist/schema/application/core.js +0 -13
- package/dist/schema/application/core.js.map +0 -1
- package/dist/schema/application/index.d.ts +0 -7
- package/dist/schema/application/index.d.ts.map +0 -1
- package/dist/schema/application/index.js +0 -7
- package/dist/schema/application/index.js.map +0 -1
- package/dist/schema/application/methods.d.ts +0 -171
- package/dist/schema/application/methods.d.ts.map +0 -1
- package/dist/schema/application/methods.js +0 -48
- package/dist/schema/application/methods.js.map +0 -1
- package/dist/schema/application/policies.d.ts +0 -3
- package/dist/schema/application/policies.d.ts.map +0 -1
- package/dist/schema/application/policies.js +0 -11
- package/dist/schema/application/policies.js.map +0 -1
- package/dist/schema/application/relationships.d.ts +0 -795
- package/dist/schema/application/relationships.d.ts.map +0 -1
- package/dist/schema/application/relationships.js +0 -20
- package/dist/schema/application/relationships.js.map +0 -1
- package/dist/schema/application/view.d.ts +0 -155
- package/dist/schema/application/view.d.ts.map +0 -1
- package/dist/schema/application/view.js +0 -7
- package/dist/schema/application/view.js.map +0 -1
- package/dist/schema/domain/index.d.ts +0 -9363
- package/dist/schema/domain/index.d.ts.map +0 -1
- package/dist/schema/domain/index.js +0 -56
- package/dist/schema/domain/index.js.map +0 -1
- package/dist/schema/group/class.d.ts +0 -59
- package/dist/schema/group/class.d.ts.map +0 -1
- package/dist/schema/group/class.js +0 -11
- package/dist/schema/group/class.js.map +0 -1
- package/dist/schema/group/core.d.ts +0 -495
- package/dist/schema/group/core.d.ts.map +0 -1
- package/dist/schema/group/core.js +0 -20
- package/dist/schema/group/core.js.map +0 -1
- package/dist/schema/group/index.d.ts +0 -7
- package/dist/schema/group/index.d.ts.map +0 -1
- package/dist/schema/group/index.js +0 -7
- package/dist/schema/group/index.js.map +0 -1
- package/dist/schema/group/methods.d.ts +0 -48
- package/dist/schema/group/methods.d.ts.map +0 -1
- package/dist/schema/group/methods.js +0 -21
- package/dist/schema/group/methods.js.map +0 -1
- package/dist/schema/group/policies.d.ts +0 -3
- package/dist/schema/group/policies.d.ts.map +0 -1
- package/dist/schema/group/policies.js +0 -7
- package/dist/schema/group/policies.js.map +0 -1
- package/dist/schema/group/relationships.d.ts +0 -293
- package/dist/schema/group/relationships.d.ts.map +0 -1
- package/dist/schema/group/relationships.js +0 -20
- package/dist/schema/group/relationships.js.map +0 -1
- package/dist/schema/group/view.d.ts +0 -62
- package/dist/schema/group/view.d.ts.map +0 -1
- package/dist/schema/group/view.js +0 -7
- package/dist/schema/group/view.js.map +0 -1
- package/dist/schema/home/index.d.ts +0 -2
- package/dist/schema/home/index.d.ts.map +0 -1
- package/dist/schema/home/index.js +0 -2
- package/dist/schema/home/index.js.map +0 -1
- package/dist/schema/home/view.d.ts +0 -4
- package/dist/schema/home/view.d.ts.map +0 -1
- package/dist/schema/home/view.js +0 -5
- package/dist/schema/home/view.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/space/class.d.ts +0 -74
- package/dist/schema/space/class.d.ts.map +0 -1
- package/dist/schema/space/class.js +0 -15
- package/dist/schema/space/class.js.map +0 -1
- package/dist/schema/space/core.d.ts +0 -995
- package/dist/schema/space/core.d.ts.map +0 -1
- package/dist/schema/space/core.js +0 -17
- package/dist/schema/space/core.js.map +0 -1
- package/dist/schema/space/index.d.ts +0 -7
- package/dist/schema/space/index.d.ts.map +0 -1
- package/dist/schema/space/index.js +0 -7
- package/dist/schema/space/index.js.map +0 -1
- package/dist/schema/space/methods.d.ts +0 -78
- package/dist/schema/space/methods.d.ts.map +0 -1
- package/dist/schema/space/methods.js +0 -31
- package/dist/schema/space/methods.js.map +0 -1
- package/dist/schema/space/policies.d.ts +0 -5
- package/dist/schema/space/policies.d.ts.map +0 -1
- package/dist/schema/space/policies.js +0 -15
- package/dist/schema/space/policies.js.map +0 -1
- package/dist/schema/space/relationships.d.ts +0 -1059
- package/dist/schema/space/relationships.d.ts.map +0 -1
- package/dist/schema/space/relationships.js +0 -25
- package/dist/schema/space/relationships.js.map +0 -1
- package/dist/schema/space/view.d.ts +0 -77
- package/dist/schema/space/view.d.ts.map +0 -1
- package/dist/schema/space/view.js +0 -7
- package/dist/schema/space/view.js.map +0 -1
- package/dist/schema/user/administrator.d.ts +0 -30
- package/dist/schema/user/administrator.d.ts.map +0 -1
- package/dist/schema/user/administrator.js +0 -19
- package/dist/schema/user/administrator.js.map +0 -1
- package/dist/schema/user/class.d.ts +0 -12
- package/dist/schema/user/class.d.ts.map +0 -1
- package/dist/schema/user/class.js +0 -7
- package/dist/schema/user/class.js.map +0 -1
- package/dist/schema/user/ensure.d.ts +0 -37
- package/dist/schema/user/ensure.d.ts.map +0 -1
- package/dist/schema/user/ensure.js +0 -28
- package/dist/schema/user/ensure.js.map +0 -1
- package/dist/schema/user/index.d.ts +0 -6
- package/dist/schema/user/index.d.ts.map +0 -1
- package/dist/schema/user/index.js +0 -6
- package/dist/schema/user/index.js.map +0 -1
- package/dist/schema/user/interface.d.ts +0 -10
- package/dist/schema/user/interface.d.ts.map +0 -1
- package/dist/schema/user/interface.js +0 -12
- package/dist/schema/user/interface.js.map +0 -1
- package/dist/schema/user/view.d.ts +0 -15
- package/dist/schema/user/view.d.ts.map +0 -1
- package/dist/schema/user/view.js +0 -7
- package/dist/schema/user/view.js.map +0 -1
- package/dist/tests/cross-layer/public.test.d.ts +0 -2
- package/dist/tests/cross-layer/public.test.d.ts.map +0 -1
- package/dist/tests/cross-layer/public.test.js +0 -70
- package/dist/tests/cross-layer/public.test.js.map +0 -1
- package/dist/tests/cross-layer/workflows.test.d.ts +0 -2
- package/dist/tests/cross-layer/workflows.test.d.ts.map +0 -1
- package/dist/tests/cross-layer/workflows.test.js +0 -290
- package/dist/tests/cross-layer/workflows.test.js.map +0 -1
- package/dist/tests/index.d.ts +0 -3
- package/dist/tests/index.d.ts.map +0 -1
- package/dist/tests/index.js +0 -3
- package/dist/tests/index.js.map +0 -1
- package/dist/utils/graph-endpoint/index.d.ts +0 -13
- package/dist/utils/graph-endpoint/index.d.ts.map +0 -1
- package/dist/utils/graph-endpoint/index.js +0 -6
- package/dist/utils/graph-endpoint/index.js.map +0 -1
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -3
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/query-page/index.d.ts +0 -3
- package/dist/utils/query-page/index.d.ts.map +0 -1
- package/dist/utils/query-page/index.js +0 -2
- package/dist/utils/query-page/index.js.map +0 -1
- package/dist/utils/query-page/nodes.d.ts +0 -16
- package/dist/utils/query-page/nodes.d.ts.map +0 -1
- package/dist/utils/query-page/nodes.js +0 -22
- package/dist/utils/query-page/nodes.js.map +0 -1
- package/dist/workflows/application/errors.d.ts +0 -5
- package/dist/workflows/application/errors.d.ts.map +0 -1
- package/dist/workflows/application/errors.js +0 -25
- package/dist/workflows/application/errors.js.map +0 -1
- package/dist/workflows/application/index.d.ts +0 -3
- package/dist/workflows/application/index.d.ts.map +0 -1
- package/dist/workflows/application/index.js +0 -3
- package/dist/workflows/application/index.js.map +0 -1
- package/dist/workflows/application/install.d.ts +0 -3
- package/dist/workflows/application/install.d.ts.map +0 -1
- package/dist/workflows/application/install.js +0 -37
- package/dist/workflows/application/install.js.map +0 -1
- package/dist/workflows/application/uninstall.d.ts +0 -4
- package/dist/workflows/application/uninstall.d.ts.map +0 -1
- package/dist/workflows/application/uninstall.js +0 -25
- package/dist/workflows/application/uninstall.js.map +0 -1
- package/dist/workflows/group/assign-user.d.ts +0 -8
- package/dist/workflows/group/assign-user.d.ts.map +0 -1
- package/dist/workflows/group/assign-user.js +0 -32
- package/dist/workflows/group/assign-user.js.map +0 -1
- package/dist/workflows/group/ensure-administrator.d.ts +0 -4
- package/dist/workflows/group/ensure-administrator.d.ts.map +0 -1
- package/dist/workflows/group/ensure-administrator.js +0 -26
- package/dist/workflows/group/ensure-administrator.js.map +0 -1
- package/dist/workflows/group/errors.d.ts +0 -2
- package/dist/workflows/group/errors.d.ts.map +0 -1
- package/dist/workflows/group/errors.js +0 -7
- package/dist/workflows/group/errors.js.map +0 -1
- package/dist/workflows/group/index.d.ts +0 -4
- package/dist/workflows/group/index.d.ts.map +0 -1
- package/dist/workflows/group/index.js +0 -4
- package/dist/workflows/group/index.js.map +0 -1
- package/dist/workflows/group/unassign-user.d.ts +0 -8
- package/dist/workflows/group/unassign-user.d.ts.map +0 -1
- package/dist/workflows/group/unassign-user.js +0 -32
- package/dist/workflows/group/unassign-user.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -4
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/index.js +0 -4
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/space/add-user.d.ts +0 -8
- package/dist/workflows/space/add-user.d.ts.map +0 -1
- package/dist/workflows/space/add-user.js +0 -34
- package/dist/workflows/space/add-user.js.map +0 -1
- package/dist/workflows/space/errors.d.ts +0 -3
- package/dist/workflows/space/errors.d.ts.map +0 -1
- package/dist/workflows/space/errors.js +0 -10
- package/dist/workflows/space/errors.js.map +0 -1
- package/dist/workflows/space/index.d.ts +0 -4
- package/dist/workflows/space/index.d.ts.map +0 -1
- package/dist/workflows/space/index.js +0 -4
- package/dist/workflows/space/index.js.map +0 -1
- package/dist/workflows/space/remove-user.d.ts +0 -8
- package/dist/workflows/space/remove-user.d.ts.map +0 -1
- package/dist/workflows/space/remove-user.js +0 -62
- package/dist/workflows/space/remove-user.js.map +0 -1
- package/dist/workflows/space/set-default.d.ts +0 -9
- package/dist/workflows/space/set-default.d.ts.map +0 -1
- package/dist/workflows/space/set-default.js +0 -43
- package/dist/workflows/space/set-default.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,66 +1,145 @@
|
|
|
1
1
|
# Shell Domain
|
|
2
2
|
|
|
3
|
-
Shell
|
|
4
|
-
the
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
The
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
3
|
+
Shell owns two concrete Identity classes, User and Group, the member_of_group relation,
|
|
4
|
+
the admin/member/applications Core groups, three static methods, one Domain function, and one
|
|
5
|
+
application View, which is its entrypoint. The Schema names the Domain `Shell`. There is no Space, setup function, personal home, or public repair method.
|
|
6
|
+
|
|
7
|
+
## Contracts
|
|
8
|
+
|
|
9
|
+
| Static method | Input | Output |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| User.invite | `{ user: UserPath, email: string }` | `{ invitationId, user, state }` |
|
|
12
|
+
| Group.assignMember | `{ member: UserPath \| GroupPath, group: GroupPath }` | `{}` |
|
|
13
|
+
| Group.unassignMember | Same | `{}` |
|
|
14
|
+
|
|
15
|
+
| Domain function | Input | Output |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| listEntrypoints | `{}` | `{ entrypoints: { origin, name, view }[] }` |
|
|
18
|
+
|
|
19
|
+
listEntrypoints reads, with Shell's own authority, every Kernel `of_domain` locator whose View has
|
|
20
|
+
an outgoing `entrypoint` Edge, and returns one entry per Domain in origin order: its origin, the
|
|
21
|
+
`name` of its Domain Node, and the key of its entrypoint View. A Domain without an entrypoint is
|
|
22
|
+
not listed. Shell requires `read` on Kernel `Domain` and `of_domain`, and `traverse` on `entrypoint`
|
|
23
|
+
and `View`. Its `usesFunction` Policy admits any caller whose composed profile holds `can_use`
|
|
24
|
+
on the Function, so holding the capability is enough.
|
|
25
|
+
|
|
26
|
+
The Core `applications` Group carries `can_use` on listEntrypoints and View.resolve. Administrators
|
|
27
|
+
hold both directly (a Core Edge cannot author Kernel `extends_with`); members do not.
|
|
28
|
+
Share them dynamically with `Group.assignMember({ member: user, group: applications })`, which
|
|
29
|
+
composes the profile through `extends_with`; `unassignMember` withdraws it.
|
|
30
|
+
|
|
31
|
+
User extends Kernel.Identity and owns only optional creationKey correlation.
|
|
32
|
+
Concrete business classes may declare their own displayName/email; Shell never reads or writes them.
|
|
33
|
+
Group extends Kernel.Identity, Named and Descriptable. Authentication remains the
|
|
34
|
+
Kernel-owned, write-once iss/sub binding. Invitation email is explicit input, not a User property.
|
|
35
|
+
|
|
36
|
+
| Operation | Schema Policy alternatives, in addition to Kernel admission |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| invite | Core admin membership AND Shell-owned concrete User class; or ownership of the User's concrete class |
|
|
39
|
+
| assignMember / unassignMember | Core admin membership AND Shell-owned concrete Group class; or ownership of the Group's concrete class |
|
|
40
|
+
|
|
41
|
+
ownsClass follows instance_of → concrete class → of_domain → caller. It does not
|
|
42
|
+
infer ownership from an email, a subclass name, or ownership of an ancestor class.
|
|
43
|
+
A Domain cannot assign its Employee to Core member merely by owning Employee. Admin's invitation
|
|
44
|
+
orchestration retains that responsibility. A Group's owner may manage any admitted User or Group in that Group.
|
|
45
|
+
administersShellClass connects Core admin membership and concrete ownership in one Policy pattern;
|
|
46
|
+
it does not treat inheritance from Shell as ownership. These are callable restrictions, not an
|
|
47
|
+
isolation boundary against Root/Manager or the existing broad administrator Kernel profile.
|
|
48
|
+
With Kernel Host beta94 or newer, an external caller needs callable authority through its own
|
|
49
|
+
identity composition AND a passing callable Policy. Declare exact foreign methods in the calling
|
|
50
|
+
Domain's requirements; can_use no longer bypasses the Policy. Root and exact owner exceptions remain.
|
|
51
|
+
|
|
52
|
+
## Flows
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Domain creates Employee extending User → unregistered, no group
|
|
56
|
+
Direct credential-evidenced Register → same node authenticates, still no group
|
|
57
|
+
User.invite → provider authentication → Admin ingress → WorkOS/login
|
|
58
|
+
→ Admin Register on that same node → member assignment → completed
|
|
59
|
+
Group.assignMember → member_of_group + Kernel.extends_with in one atomic mutation
|
|
60
|
+
Group.unassignMember → remove both edges in one atomic mutation
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The invitation flow is coordinated by Admin, not by an Employee callback. Shell's Integration
|
|
64
|
+
carries only user/email/requestId/requestedBy. Its Provider mints an invocation-bound Shell
|
|
65
|
+
proof for its configured HTTPS ingress audience; target/sourceProof are not business inputs.
|
|
66
|
+
A returned pending invitation does not prove email delivery or completed registration.
|
|
67
|
+
|
|
68
|
+
`assignMember({ member: A, group: B })` adds A to B. A and its current and future members inherit
|
|
69
|
+
B's authority. Groups can have several parents; Kernel rejects self-membership and cycles in the
|
|
70
|
+
same transaction as both membership edges. The target Group's manager authorizes this delegation;
|
|
71
|
+
the child Group's managers can subsequently change the population that inherits it.
|
|
72
|
+
|
|
73
|
+
`unassignMember` removes only that direct pair. Another membership path can preserve effective
|
|
74
|
+
access. Queries of `member_of_group` continue to return direct facts; Grant evaluation expands
|
|
75
|
+
identity composition for Policies. Shell must be able to traverse both concrete endpoint Classes,
|
|
76
|
+
including a foreign Group used as the member.
|
|
77
|
+
|
|
78
|
+
Membership methods converge both edges, including an observed partial membership.
|
|
79
|
+
After an uncertain mutation response they re-read the pair; an unconfirmed outcome remains
|
|
80
|
+
explicitly unconfirmed. This is not a global repair scan or an exactly-once guarantee.
|
|
81
|
+
|
|
82
|
+
A Team class extending Group can carry a business permission edge to Project. Membership
|
|
83
|
+
composition lets an Employee's expanded grant include Team; the protected Project Policy is
|
|
84
|
+
still evaluated by Kernel. Removing composition removes that authority path. Installed
|
|
85
|
+
Kernel E2E evidence, not a handler test, qualifies this behavior.
|
|
86
|
+
|
|
87
|
+
## Installation and View
|
|
88
|
+
|
|
89
|
+
The Shell principal requests all Kernel root functions, the required extends_with operations,
|
|
90
|
+
and the declared grant/revoke authority. Core admin receives the full declared Shell profile,
|
|
91
|
+
including invite, assignMember and unassignMember so humans inheriting admin can call those methods.
|
|
92
|
+
Core member receives Introspect, Query, Mutate and View.resolve, not blanket class-read grants.
|
|
93
|
+
The Domain definition's requirements, including Core Identity capabilities in requirements.core, are owned by domain.ts and materialized by installation,
|
|
94
|
+
never by invitation handlers.
|
|
95
|
+
|
|
96
|
+
The sole application entrypoint uses the Vite React frontend at /, composed with
|
|
97
|
+
`@astrale-os/shell-react` and `@astrale-os/ui`. It lists visible User/Group families in two tabs
|
|
98
|
+
under the caller's session, with loading/empty/error states and independent refresh.
|
|
99
|
+
Users display their concrete class and Node ID, not a guessed foreign profile.
|
|
100
|
+
It does not proxy privileged directory reads or enumerate installed applications.
|
|
101
|
+
|
|
102
|
+
## Source and qualification
|
|
103
|
+
|
|
104
|
+
Each declaration, Query and Mutation has its own semantic file. Layer roots are facades;
|
|
105
|
+
functions own orchestration, integrations/providers own external effects, views/ui own the
|
|
106
|
+
directory surface. Runtime has one default export and binds the three static Workflows.
|
|
107
|
+
The Dataset is referenced lazily by the root astrale.config.ts.
|
|
108
|
+
|
|
109
|
+
Domain authors import Schema from @astrale-domains/shell; platform workers use the explicit
|
|
110
|
+
/domain and /runtime exports. Creation/registration, installation authority, invitation
|
|
111
|
+
delivery, runtime replay and browser rendering are separate qualification boundaries.
|
|
112
|
+
The redesigned Admin composition, published Register cohort and real invitation/instance-create
|
|
113
|
+
journeys remain release gates; this source README is not evidence that those gates passed.
|
|
114
|
+
|
|
115
|
+
### Publication boundary
|
|
116
|
+
|
|
117
|
+
`@astrale-domains/shell` is an executable platform package and a deliberate exception to the normal
|
|
118
|
+
Domain publication product. It publishes the remote Shell Domain definition and runtime needed by platform
|
|
119
|
+
Worker deployments through the explicit `./domain` and `./runtime` subpaths, while its root remains
|
|
120
|
+
Schema-only. Its build therefore compiles the explicit roots in `tsconfig.package.json` and applies
|
|
121
|
+
Shell-owned normalization and checks to the emitted platform closure. Source-only `#` aliases are
|
|
122
|
+
rewritten to relative JS and declaration references so consumer path mappings cannot capture private Shell
|
|
123
|
+
types. Tarball qualification then verifies the exact exports, isolated subpaths, absence of source
|
|
124
|
+
maps, and an install using only public npm dependencies.
|
|
125
|
+
|
|
126
|
+
The generic `astrale-domain package` command remains Schema-only and exposes only the Domain root plus
|
|
127
|
+
package metadata. This Shell exception must not be copied to ordinary product Domains or used to
|
|
128
|
+
weaken that SDK contract. Deployment consumers must use the explicit executable subpaths so a linked
|
|
129
|
+
schema import cannot traverse Shell's private application or runtime implementation.
|
|
130
|
+
|
|
131
|
+
Source, package, and deterministic test qualification remain distinct from installed-instance,
|
|
132
|
+
released-package, browser, and live-credential evidence. Shell does not broker authentication
|
|
133
|
+
tokens; standard Domain token exchange is owned by Protocol, Server, and SDK.
|
|
134
|
+
|
|
135
|
+
### Breaking membership API migration
|
|
136
|
+
|
|
137
|
+
`Group.assignMember` / `Group.unassignMember` replace `assignUser` / `unassignUser` without aliases.
|
|
138
|
+
Callers must change `{ user, group }` to `{ member, group }` and declare the new exact callable
|
|
139
|
+
requirements. The `member_of_group` Class key is preserved; its source role is now `member` and
|
|
140
|
+
accepts User or Group families. Existing User memberships remain valid.
|
|
141
|
+
|
|
142
|
+
Rebuild and install all affected Schema dependents as one coherent revision closure. Admin bootstrap
|
|
143
|
+
and invitation completion must use the new API when this Shell revision is installed. A downgrade
|
|
144
|
+
to the User-only contract requires handling any Group-to-Group facts first. Validate public admission,
|
|
145
|
+
foreign endpoint traversal, and deployed revisions during the coordinated release.
|
package/dist/domain.d.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type DomainDefinition } from '@astrale-os/sdk/domain';
|
|
2
|
+
import { ShellSchema } from './schema/index.js';
|
|
3
|
+
import { type ShellRuntime } from './runtime.js';
|
|
4
|
+
declare const frontend: import("@astrale-os/sdk/view").Frontend<import("@astrale-os/sdk/schema").AuthoredSchema<"shell.astrale.ai", readonly ["kernel.astrale.ai", import("@astrale-os/sdk/schema").KernelSchema] | readonly ["shell.astrale.ai", {
|
|
5
|
+
readonly name: 'Shell';
|
|
6
|
+
readonly entrypoint: 'application';
|
|
7
|
+
readonly classes: {
|
|
8
|
+
readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
9
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
10
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
};
|
|
14
|
+
readonly methods: {
|
|
15
|
+
readonly invite: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
16
|
+
user: string;
|
|
17
|
+
email: string;
|
|
18
|
+
}, {
|
|
19
|
+
readonly mode: 'value';
|
|
20
|
+
readonly value: {
|
|
21
|
+
invitationId: string;
|
|
22
|
+
user: string;
|
|
23
|
+
state: "accepted" | "cancelled" | "completed" | "expired" | "failed" | "pending" | "registered" | "registering";
|
|
24
|
+
};
|
|
25
|
+
}, "authorized", true, false, undefined>>;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
29
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
30
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
|
|
31
|
+
readonly methods: {
|
|
32
|
+
readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
33
|
+
member: string;
|
|
34
|
+
group: string;
|
|
35
|
+
}, {
|
|
36
|
+
readonly mode: 'value';
|
|
37
|
+
readonly value: Record<string, never>;
|
|
38
|
+
}, "authorized", true, false, undefined>>;
|
|
39
|
+
readonly unassignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
40
|
+
member: string;
|
|
41
|
+
group: string;
|
|
42
|
+
}, {
|
|
43
|
+
readonly mode: 'value';
|
|
44
|
+
readonly value: Record<string, never>;
|
|
45
|
+
}, "authorized", true, false, undefined>>;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
readonly member_of_group: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
49
|
+
readonly depth: 0;
|
|
50
|
+
readonly abstract: false;
|
|
51
|
+
readonly extends: readonly [];
|
|
52
|
+
readonly properties: never;
|
|
53
|
+
readonly source: {
|
|
54
|
+
readonly as: "member";
|
|
55
|
+
readonly outgoing: "0..*";
|
|
56
|
+
};
|
|
57
|
+
readonly target: {
|
|
58
|
+
readonly as: "group";
|
|
59
|
+
readonly incoming: "0..*";
|
|
60
|
+
};
|
|
61
|
+
readonly constraints: Record<never, never>;
|
|
62
|
+
readonly effectiveProperties: never;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
readonly functions: {
|
|
66
|
+
readonly listEntrypoints: import("@astrale-os/sdk/schema").Function<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
67
|
+
readonly mode: 'value';
|
|
68
|
+
readonly value: {
|
|
69
|
+
entrypoints: {
|
|
70
|
+
origin: string;
|
|
71
|
+
name: string;
|
|
72
|
+
view: string;
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
}, "authorized", false, false, undefined>>;
|
|
76
|
+
};
|
|
77
|
+
readonly policies: {
|
|
78
|
+
readonly belongsToGroup: import("@astrale-os/sdk/schema").Policy;
|
|
79
|
+
readonly ownsClass: import("@astrale-os/sdk/schema").Policy;
|
|
80
|
+
readonly administersShellClass: import("@astrale-os/sdk/schema").Policy;
|
|
81
|
+
readonly usesFunction: import("@astrale-os/sdk/schema").Policy;
|
|
82
|
+
};
|
|
83
|
+
readonly views: {
|
|
84
|
+
readonly application: import("@astrale-os/sdk/schema").View;
|
|
85
|
+
};
|
|
86
|
+
readonly core: {
|
|
87
|
+
readonly nodes: {
|
|
88
|
+
readonly admin: import("@astrale-os/sdk/schema").CoreNode;
|
|
89
|
+
readonly applications: import("@astrale-os/sdk/schema").CoreNode;
|
|
90
|
+
readonly member: import("@astrale-os/sdk/schema").CoreNode;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
readonly kernel: "kernel.astrale.ai";
|
|
95
|
+
}]>>;
|
|
96
|
+
declare const domainRequirements: import("@astrale-os/sdk/domain").Requirements;
|
|
97
|
+
export type ShellDomain = DomainDefinition<typeof ShellSchema, ShellRuntime, typeof frontend, undefined, typeof domainRequirements>;
|
|
98
|
+
export declare const domain: ShellDomain;
|
|
99
|
+
export {};
|
package/dist/domain.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineDomain, defineFrontend, vite, requirements, } from '@astrale-os/sdk/domain';
|
|
2
|
+
import { K, KernelRootFunctions } from '@astrale-os/sdk/schema';
|
|
3
|
+
import { ShellSchema, S } from './schema/index.js';
|
|
4
|
+
import runtime, {} from './runtime.js';
|
|
5
|
+
const frontend = defineFrontend({
|
|
6
|
+
schema: ShellSchema,
|
|
7
|
+
source: vite({ config: './frontend/vite.config.ts' }),
|
|
8
|
+
routes: { application: { path: '/', handshake: 'shell' } },
|
|
9
|
+
});
|
|
10
|
+
const domainRequirements = requirements({
|
|
11
|
+
// Sujet implicite : le principal installé Shell, utilisé par kernel.self.
|
|
12
|
+
functions: KernelRootFunctions,
|
|
13
|
+
classes: [
|
|
14
|
+
{ class: K.classes.extends_with, operations: ['create', 'read', 'traverse', 'delete'] },
|
|
15
|
+
// listEntrypoints reads every entrypoint View locator and its Domain as Shell.
|
|
16
|
+
{ class: K.classes.Domain, operations: ['read'] },
|
|
17
|
+
{ class: K.classes.of_domain, operations: ['read'] },
|
|
18
|
+
{ class: K.classes.entrypoint, operations: ['traverse'] },
|
|
19
|
+
{ class: K.classes.View, operations: ['traverse'] },
|
|
20
|
+
],
|
|
21
|
+
authority: {
|
|
22
|
+
grant: ['create', 'read', 'update', 'delete', 'traverse', 'use', 'revoke'],
|
|
23
|
+
revoke: ['create', 'read', 'update', 'delete', 'traverse', 'use', 'grant'],
|
|
24
|
+
},
|
|
25
|
+
// Ces profils sont matérialisés par l'installeur, pas par un handler Shell.
|
|
26
|
+
core: [
|
|
27
|
+
{
|
|
28
|
+
subject: S.core.nodes.admin,
|
|
29
|
+
functions: [
|
|
30
|
+
...KernelRootFunctions,
|
|
31
|
+
S.classes.User.static.methods.invite,
|
|
32
|
+
S.classes.Group.static.methods.assignMember,
|
|
33
|
+
S.classes.Group.static.methods.unassignMember,
|
|
34
|
+
// Core Edges cannot author Kernel extends_with, so administrators hold it directly.
|
|
35
|
+
S.functions.listEntrypoints,
|
|
36
|
+
],
|
|
37
|
+
classes: [
|
|
38
|
+
{ class: S.classes.User, operations: ['create', 'read', 'traverse', 'update', 'delete'] },
|
|
39
|
+
{
|
|
40
|
+
class: S.classes.Group,
|
|
41
|
+
operations: ['create', 'read', 'traverse', 'update', 'delete'],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
class: S.classes.member_of_group,
|
|
45
|
+
operations: ['create', 'read', 'traverse', 'update', 'delete'],
|
|
46
|
+
},
|
|
47
|
+
{ class: K.classes.extends_with, operations: ['create', 'read', 'traverse', 'delete'] },
|
|
48
|
+
],
|
|
49
|
+
authority: {
|
|
50
|
+
grant: ['create', 'read', 'update', 'delete', 'traverse', 'use', 'revoke'],
|
|
51
|
+
revoke: ['create', 'read', 'update', 'delete', 'traverse', 'use', 'grant'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
subject: S.core.nodes.member,
|
|
56
|
+
functions: [
|
|
57
|
+
// Download re-reads the holder Node with the caller's authority: no new data exposure.
|
|
58
|
+
K.functions.download,
|
|
59
|
+
K.functions.introspect,
|
|
60
|
+
K.functions.query,
|
|
61
|
+
K.functions.mutate,
|
|
62
|
+
K.classes.View.static.methods.resolve,
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
// Shared dynamically: Group.assignMember(user, applications) composes this profile.
|
|
67
|
+
subject: S.core.nodes.applications,
|
|
68
|
+
functions: [S.functions.listEntrypoints, K.classes.View.static.methods.resolve],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
});
|
|
72
|
+
export const domain = defineDomain({
|
|
73
|
+
schema: ShellSchema,
|
|
74
|
+
runtime,
|
|
75
|
+
frontend,
|
|
76
|
+
requirements: domainRequirements,
|
|
77
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defineAction } from '@astrale-os/sdk/action';
|
|
2
|
+
import { readInstalledEntrypoints } from '../../queries/application/index.js';
|
|
3
|
+
/** One graph read: every Domain with an `entrypoint` Edge, its name and its entrypoint View. */
|
|
4
|
+
export const listEntrypoints = defineAction()('listEntrypoints', async ({ query }) => ({ entrypoints: [...(await query(readInstalledEntrypoints, {}))] }));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defineWorkflow } from '@astrale-os/sdk/workflow';
|
|
2
|
+
import { changeGroupMembership } from './change-group-membership.js';
|
|
3
|
+
import { groupMembershipErrors } from './group-membership-errors.js';
|
|
4
|
+
export const assignMember = defineWorkflow()('Group.assignMember', { errors: groupMembershipErrors }, (context) => changeGroupMembership(context, true));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { setGroupMembership } from '../../mutations/group/index.js';
|
|
2
|
+
import { readGroupMembership, readGroupMembershipEndpoints, } from '../../queries/group/index.js';
|
|
3
|
+
import { canonicalNodeId } from '../../utils/canonical-node-path/index.js';
|
|
4
|
+
const matches = (state, present) => state.membership === present && state.authority === present;
|
|
5
|
+
export async function changeGroupMembership(context, present) {
|
|
6
|
+
const invalid = () => context.error('INVALID_GROUP_MEMBERSHIP_REFERENCE', {});
|
|
7
|
+
const membership = {
|
|
8
|
+
member: canonicalNodeId(context.input.member, invalid),
|
|
9
|
+
group: canonicalNodeId(context.input.group, invalid),
|
|
10
|
+
};
|
|
11
|
+
const observe = async () => {
|
|
12
|
+
const endpoints = await context.query(readGroupMembershipEndpoints, membership);
|
|
13
|
+
if (!endpoints.visible)
|
|
14
|
+
throw context.error('GROUP_MEMBERSHIP_ENDPOINTS_UNAVAILABLE', {});
|
|
15
|
+
const current = await context.query(readGroupMembership, membership);
|
|
16
|
+
return { ...current, endpoints: endpoints.guard };
|
|
17
|
+
};
|
|
18
|
+
const current = await context.step.run('observe-membership', observe);
|
|
19
|
+
if (matches(current, present))
|
|
20
|
+
return {};
|
|
21
|
+
const result = await context.step.run('mutate-membership', () => context.mutate(setGroupMembership, { ...membership, current, present }));
|
|
22
|
+
if (result.ok)
|
|
23
|
+
return {};
|
|
24
|
+
if (result.outcomeKnown) {
|
|
25
|
+
throw context.error('GROUP_MEMBERSHIP_CONFLICT', { cause: result.code });
|
|
26
|
+
}
|
|
27
|
+
const recovered = await context.step.run('recover-membership', observe);
|
|
28
|
+
if (matches(recovered, present))
|
|
29
|
+
return {};
|
|
30
|
+
throw context.error('GROUP_MEMBERSHIP_UNCONFIRMED', {
|
|
31
|
+
cause: result.code,
|
|
32
|
+
outcomeKnown: false,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const groupMembershipErrors = {
|
|
3
|
+
GROUP_MEMBERSHIP_ENDPOINTS_UNAVAILABLE: {
|
|
4
|
+
family: 'CONFLICT',
|
|
5
|
+
message: 'Shell must be able to traverse both membership endpoints before confirming membership.',
|
|
6
|
+
details: z.strictObject({}),
|
|
7
|
+
},
|
|
8
|
+
INVALID_GROUP_MEMBERSHIP_REFERENCE: {
|
|
9
|
+
family: 'VALIDATION_ERROR',
|
|
10
|
+
message: 'Member and group must be exact canonical @NodeId paths.',
|
|
11
|
+
details: z.strictObject({}),
|
|
12
|
+
},
|
|
13
|
+
GROUP_MEMBERSHIP_CONFLICT: {
|
|
14
|
+
family: 'CONFLICT',
|
|
15
|
+
message: 'Membership changed concurrently; retry the operation.',
|
|
16
|
+
details: z.strictObject({ cause: z.string() }),
|
|
17
|
+
},
|
|
18
|
+
GROUP_MEMBERSHIP_UNCONFIRMED: {
|
|
19
|
+
family: 'CONFLICT',
|
|
20
|
+
message: 'The requested membership could not be confirmed; retry the operation.',
|
|
21
|
+
details: z.strictObject({ cause: z.string(), outcomeKnown: z.literal(false) }),
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { assignMember } from './assign-member-to-group.js';
|
|
2
|
+
export { unassignMember } from './unassign-member-from-group.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { defineWorkflow } from '@astrale-os/sdk/workflow';
|
|
2
|
+
import { changeGroupMembership } from './change-group-membership.js';
|
|
3
|
+
import { groupMembershipErrors } from './group-membership-errors.js';
|
|
4
|
+
export const unassignMember = defineWorkflow()('Group.unassignMember', { errors: groupMembershipErrors }, (context) => changeGroupMembership(context, false));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineWorkflow } from '@astrale-os/sdk/workflow';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { InvitationRequestFailure } from '../../integrations/user-invitation/index.js';
|
|
4
|
+
import { canonicalNodeId } from '../../utils/canonical-node-path/index.js';
|
|
5
|
+
export const invite = defineWorkflow()('User.invite', {
|
|
6
|
+
errors: {
|
|
7
|
+
INVALID_INVITATION_REFERENCE: {
|
|
8
|
+
family: 'VALIDATION_ERROR',
|
|
9
|
+
message: 'User must be an exact canonical @NodeId path.',
|
|
10
|
+
details: z.strictObject({}),
|
|
11
|
+
},
|
|
12
|
+
INVITATION_CONFLICT: {
|
|
13
|
+
family: 'CONFLICT',
|
|
14
|
+
message: 'The invitation conflicts with an existing request.',
|
|
15
|
+
details: z.strictObject({ requestId: z.string() }),
|
|
16
|
+
},
|
|
17
|
+
INVITATION_REJECTED: {
|
|
18
|
+
family: 'VALIDATION_ERROR',
|
|
19
|
+
message: 'Admin rejected the invitation request.',
|
|
20
|
+
details: z.strictObject({ requestId: z.string() }),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
}, async (context) => {
|
|
24
|
+
const user = canonicalNodeId(context.input.user, () => context.error('INVALID_INVITATION_REFERENCE', {}));
|
|
25
|
+
const requestId = context.execution.idempotencyKey ?? crypto.randomUUID();
|
|
26
|
+
try {
|
|
27
|
+
return await context.step.run('request-invitation', () => context.integrations.enrollment.invite({
|
|
28
|
+
user,
|
|
29
|
+
email: context.input.email,
|
|
30
|
+
requestId,
|
|
31
|
+
requestedBy: context.caller.identity,
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
catch (cause) {
|
|
35
|
+
if (cause instanceof InvitationRequestFailure)
|
|
36
|
+
throw context.error(cause.code, { requestId });
|
|
37
|
+
throw cause;
|
|
38
|
+
}
|
|
39
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { ShellDomain } from './public.js';
|
|
3
|
-
export { buildShellUserProvisioning, projectShellUserProvisioning, type EnsureShellUserInput, type ShellUserProvisioning, } from './rules/user/index.js';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { ShellSchema, S, type Shell, type ShellClasses, type ShellSchemaInput, type InvitationSummary, User, Group, member_of_group, adminGroup, memberGroup, } from './schema/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { ShellDomain } from './public.js';
|
|
3
|
-
export { buildShellUserProvisioning, projectShellUserProvisioning, } from './rules/user/index.js';
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { ShellSchema, S, User, Group, member_of_group, adminGroup, memberGroup, } from './schema/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { integrations } from './integrations.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { integrations } from './integrations.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const integrations: {
|
|
2
|
+
enrollment: import("@astrale-os/sdk/integration").IntegrationDefinition<"shell.enrollment", {
|
|
3
|
+
invite: import("@astrale-os/sdk/integration").IntegrationOperation<import("./user-invitation/index.js").InviteRequest, {
|
|
4
|
+
invitationId: string;
|
|
5
|
+
user: string;
|
|
6
|
+
state: "accepted" | "cancelled" | "completed" | "expired" | "failed" | "pending" | "registered" | "registering";
|
|
7
|
+
}>;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { enrollment } from './request-user-invitation.js';
|
|
2
|
+
export { InvitationRequestFailure } from './invitation-request-failure.js';
|
|
3
|
+
export { type InviteRequest } from './invite-user-request.js';
|
|
4
|
+
export type { InvitationSummary } from '../../schema/modules/user/index.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Expected business refusal from the invitation service, without its response body. */
|
|
2
|
+
export declare class InvitationRequestFailure extends Error {
|
|
3
|
+
readonly code: 'INVITATION_CONFLICT' | 'INVITATION_REJECTED';
|
|
4
|
+
constructor(code: 'INVITATION_CONFLICT' | 'INVITATION_REJECTED');
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|