@astrale-domains/shell 0.1.0-beta.41 → 0.1.0-beta.43

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 CHANGED
@@ -23,10 +23,13 @@ not listed. Shell requires `read` on Kernel `Domain` and `of_domain`, and `trave
23
23
  and `View`. Its `usesFunction` Policy admits any caller whose composed profile holds `can_use`
24
24
  on the Function, so holding the capability is enough.
25
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.
26
+ The workspace opens only once listEntrypoints answers, so every profile that admits a person to
27
+ the workspace holds it. Administrators and members hold both listEntrypoints and View.resolve
28
+ directly (a Core Edge cannot author Kernel `extends_with`): an invited person, whom Admin assigns
29
+ to Core member, can open the workspace. The Core `applications` Group carries the same two
30
+ capabilities for Identities outside Members. Share them dynamically with
31
+ `Group.assignMember({ member: identity, group: applications })`, which composes the profile through
32
+ `extends_with`; `unassignMember` withdraws it.
30
33
 
31
34
  User extends Kernel.Identity and owns only optional creationKey correlation.
32
35
  Concrete business classes may declare their own displayName/email; Shell never reads or writes them.
@@ -71,8 +74,8 @@ same transaction as both membership edges. The target Group's manager authorizes
71
74
  the child Group's managers can subsequently change the population that inherits it.
72
75
 
73
76
  `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,
77
+ access. Queries of `member_of_group` continue to return direct facts; Policy evaluation expands
78
+ the caller's identity composition. Shell must be able to traverse both concrete endpoint Classes,
76
79
  including a foreign Group used as the member.
77
80
 
78
81
  Membership methods converge both edges, including an observed partial membership.
@@ -80,7 +83,7 @@ After an uncertain mutation response they re-read the pair; an unconfirmed outco
80
83
  explicitly unconfirmed. This is not a global repair scan or an exactly-once guarantee.
81
84
 
82
85
  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
86
+ composition lets an Employee, as caller, inherit Team's authority; the protected Project Policy is
84
87
  still evaluated by Kernel. Removing composition removes that authority path. Installed
85
88
  Kernel E2E evidence, not a handler test, qualifies this behavior.
86
89
 
@@ -89,7 +92,8 @@ Kernel E2E evidence, not a handler test, qualifies this behavior.
89
92
  The Shell principal requests all Kernel root functions, the required extends_with operations,
90
93
  and the declared grant/revoke authority. Core admin receives the full declared Shell profile,
91
94
  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.
95
+ Core member receives Download, Introspect, Query, Mutate, View.resolve and listEntrypoints, not
96
+ blanket class-read grants.
93
97
  The Domain definition's requirements, including Core Identity capabilities in requirements.core, are owned by domain.ts and materialized by installation,
94
98
  never by invitation handlers.
95
99
 
package/dist/domain.d.ts CHANGED
@@ -7,6 +7,9 @@ declare const frontend: import("@astrale-os/sdk/view").Frontend<import("@astrale
7
7
  readonly classes: {
8
8
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
9
9
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
10
+ readonly policies: {
11
+ readonly read: true;
12
+ };
10
13
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
11
14
  readonly properties: {
12
15
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -27,6 +30,9 @@ declare const frontend: import("@astrale-os/sdk/view").Frontend<import("@astrale
27
30
  }>;
28
31
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
29
32
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
33
+ readonly policies: {
34
+ readonly read: true;
35
+ };
30
36
  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
37
  readonly methods: {
32
38
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
package/dist/domain.js CHANGED
@@ -60,10 +60,12 @@ const domainRequirements = requirements({
60
60
  K.functions.query,
61
61
  K.functions.mutate,
62
62
  K.classes.View.static.methods.resolve,
63
+ // The workspace opens only on this catalogue: an invited member must be able to read it.
64
+ S.functions.listEntrypoints,
63
65
  ],
64
66
  },
65
67
  {
66
- // Shared dynamically: Group.assignMember(user, applications) composes this profile.
68
+ // For Identities outside Members: Group.assignMember(identity, applications) composes it.
67
69
  subject: S.core.nodes.applications,
68
70
  functions: [S.functions.listEntrypoints, K.classes.View.static.methods.resolve],
69
71
  },
package/dist/runtime.d.ts CHANGED
@@ -18,6 +18,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
18
18
  readonly classes: {
19
19
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
20
20
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
21
+ readonly policies: {
22
+ readonly read: true;
23
+ };
21
24
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
22
25
  readonly properties: {
23
26
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -38,6 +41,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
38
41
  }>;
39
42
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
40
43
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
44
+ readonly policies: {
45
+ readonly read: true;
46
+ };
41
47
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
42
48
  readonly methods: {
43
49
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -137,6 +143,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
137
143
  readonly classes: {
138
144
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
139
145
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
146
+ readonly policies: {
147
+ readonly read: true;
148
+ };
140
149
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
141
150
  readonly properties: {
142
151
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -157,6 +166,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
157
166
  }>;
158
167
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
159
168
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
169
+ readonly policies: {
170
+ readonly read: true;
171
+ };
160
172
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
161
173
  readonly methods: {
162
174
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -254,6 +266,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
254
266
  readonly classes: {
255
267
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
256
268
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
269
+ readonly policies: {
270
+ readonly read: true;
271
+ };
257
272
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
258
273
  readonly properties: {
259
274
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -274,6 +289,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
274
289
  }>;
275
290
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
276
291
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
292
+ readonly policies: {
293
+ readonly read: true;
294
+ };
277
295
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
278
296
  readonly methods: {
279
297
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -371,6 +389,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
371
389
  readonly classes: {
372
390
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
373
391
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
392
+ readonly policies: {
393
+ readonly read: true;
394
+ };
374
395
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
375
396
  readonly properties: {
376
397
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -391,6 +412,9 @@ declare const functions: readonly [import("@astrale-os/sdk/workflow").WorkflowDe
391
412
  }>;
392
413
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
393
414
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
415
+ readonly policies: {
416
+ readonly read: true;
417
+ };
394
418
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
395
419
  readonly methods: {
396
420
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -11,6 +11,6 @@ export const listEntrypoints = func({
11
11
  auth: 'authorized',
12
12
  input: z.strictObject({}),
13
13
  output: z.object({ entrypoints: z.array(entrypointEntry) }),
14
- // Holding can_use is enough: membership of the Applications Group shares it dynamically.
14
+ // Holding can_use is enough: Core admin and member hold it; the Applications Group shares it.
15
15
  policy: ({ check, ref }) => check(usesFunction, ref(() => listEntrypoints)),
16
16
  });
@@ -1,5 +1,8 @@
1
1
  export declare const Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
2
2
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
3
+ readonly policies: {
4
+ readonly read: true;
5
+ };
3
6
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
4
7
  readonly methods: {
5
8
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -3,6 +3,7 @@ import { UsersRound } from '@astrale-os/sdk/schema/icons';
3
3
  import { assignMember, unassignMember } from '../functions/index.js';
4
4
  export const Group = nodeClass({
5
5
  icon: classIcon.lucide(UsersRound),
6
+ policies: { read: true },
6
7
  extends: [K.classes.Identity, K.classes.Named, K.classes.Descriptable],
7
8
  methods: { assignMember, unassignMember },
8
9
  });
@@ -2,6 +2,7 @@ import { edgeClass } from '@astrale-os/sdk/schema';
2
2
  import { User } from '../../user/index.js';
3
3
  import { Group } from './group.js';
4
4
  export const member_of_group = edgeClass.directed({
5
+ policies: { read: true },
5
6
  source: {
6
7
  as: 'member',
7
8
  accepts: [() => User, () => Group],
@@ -1,6 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export declare const User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
3
3
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
4
+ readonly policies: {
5
+ readonly read: true;
6
+ };
4
7
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
5
8
  readonly properties: {
6
9
  readonly creationKey: z.ZodOptional<z.ZodString>;
@@ -6,6 +6,7 @@ import { invite } from '../functions/index.js';
6
6
  const creationKey = z.string().min(1).max(512).optional();
7
7
  export const User = nodeClass({
8
8
  icon: classIcon.lucide(UserRound),
9
+ policies: { read: true },
9
10
  extends: [K.classes.Identity],
10
11
  properties: { creationKey },
11
12
  methods: { invite },
@@ -3,6 +3,9 @@ export declare const ORIGIN: 'shell.astrale.ai';
3
3
  declare const classes: {
4
4
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
5
5
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
6
+ readonly policies: {
7
+ readonly read: true;
8
+ };
6
9
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
7
10
  readonly properties: {
8
11
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -23,6 +26,9 @@ declare const classes: {
23
26
  }>;
24
27
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
25
28
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
29
+ readonly policies: {
30
+ readonly read: true;
31
+ };
26
32
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
27
33
  readonly methods: {
28
34
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -68,6 +74,9 @@ declare const input: {
68
74
  readonly classes: {
69
75
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
70
76
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
77
+ readonly policies: {
78
+ readonly read: true;
79
+ };
71
80
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
72
81
  readonly properties: {
73
82
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -88,6 +97,9 @@ declare const input: {
88
97
  }>;
89
98
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
90
99
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
100
+ readonly policies: {
101
+ readonly read: true;
102
+ };
91
103
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
92
104
  readonly methods: {
93
105
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -159,6 +171,9 @@ export declare const ShellSchema: import("@astrale-os/sdk/schema").AuthoredSchem
159
171
  readonly classes: {
160
172
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
161
173
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
174
+ readonly policies: {
175
+ readonly read: true;
176
+ };
162
177
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
163
178
  readonly properties: {
164
179
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -179,6 +194,9 @@ export declare const ShellSchema: import("@astrale-os/sdk/schema").AuthoredSchem
179
194
  }>;
180
195
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
181
196
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
197
+ readonly policies: {
198
+ readonly read: true;
199
+ };
182
200
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
183
201
  readonly methods: {
184
202
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -252,6 +270,9 @@ export declare const S: schema.ResolvedDomainOf<import("@astrale-os/sdk/schema")
252
270
  readonly classes: {
253
271
  readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
254
272
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
273
+ readonly policies: {
274
+ readonly read: true;
275
+ };
255
276
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">];
256
277
  readonly properties: {
257
278
  readonly creationKey: import("zod").ZodOptional<import("zod").ZodString>;
@@ -272,6 +293,9 @@ export declare const S: schema.ResolvedDomainOf<import("@astrale-os/sdk/schema")
272
293
  }>;
273
294
  readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
274
295
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
296
+ readonly policies: {
297
+ readonly read: true;
298
+ };
275
299
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Identity">, import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
276
300
  readonly methods: {
277
301
  readonly assignMember: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/shell",
3
- "version": "0.1.0-beta.41",
3
+ "version": "0.1.0-beta.43",
4
4
  "description": "Astrale Shell Domain schema and remote product implementation",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -58,8 +58,8 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@astrale-os/ox": "0.1.4",
61
- "@astrale-os/sdk": "0.6.0-beta.25",
62
- "@astrale-os/shell-react": ">=0.6.0-beta.1 <1.0.0",
61
+ "@astrale-os/sdk": "0.6.0-beta.28",
62
+ "@astrale-os/shell-react": ">=0.6.0-beta.2 <1.0.0",
63
63
  "@astrale-os/ui": "1.0.0-beta.32",
64
64
  "@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~2.0.0",
65
65
  "@testing-library/dom": "10.4.1",
@@ -76,7 +76,7 @@
76
76
  "vitest": "5.0.1"
77
77
  },
78
78
  "peerDependencies": {
79
- "@astrale-os/sdk": ">=0.6.0-beta.25 <1.0.0"
79
+ "@astrale-os/sdk": ">=0.6.0-beta.28 <1.0.0"
80
80
  },
81
81
  "devEngines": {
82
82
  "runtime": {