@astrale-domains/shell 0.1.0-beta.46 → 0.1.0-beta.48
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 +57 -5
- package/dist/domain.d.ts +49 -0
- package/dist/domain.js +12 -1
- package/dist/functions/namespace/index.js +3 -0
- package/dist/functions/namespace/link.js +30 -0
- package/dist/functions/namespace/namespace-errors.js +28 -0
- package/dist/functions/namespace/namespace-name.js +13 -0
- package/dist/functions/namespace/rename.js +31 -0
- package/dist/functions/namespace/unlink.js +21 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mutations/namespace/alias-write.js +22 -0
- package/dist/mutations/namespace/index.js +3 -0
- package/dist/mutations/namespace/link-alias.js +15 -0
- package/dist/mutations/namespace/rename-alias.js +13 -0
- package/dist/mutations/namespace/unlink-alias.js +13 -0
- package/dist/queries/namespace/index.js +1 -0
- package/dist/queries/namespace/read-designated-node.js +12 -0
- package/dist/runtime.d.ts +731 -1
- package/dist/runtime.js +10 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/modules/group/classes/group.d.ts +1 -0
- package/dist/schema/modules/group/classes/group.js +2 -0
- package/dist/schema/modules/namespace/classes/alias.d.ts +21 -0
- package/dist/schema/modules/namespace/classes/alias.js +13 -0
- package/dist/schema/modules/namespace/classes/index.d.ts +2 -0
- package/dist/schema/modules/namespace/classes/index.js +2 -0
- package/dist/schema/modules/namespace/classes/namespace.d.ts +31 -0
- package/dist/schema/modules/namespace/classes/namespace.js +10 -0
- package/dist/schema/modules/namespace/core/index.d.ts +1 -0
- package/dist/schema/modules/namespace/core/index.js +1 -0
- package/dist/schema/modules/namespace/core/views-namespace.d.ts +2 -0
- package/dist/schema/modules/namespace/core/views-namespace.js +7 -0
- package/dist/schema/modules/namespace/functions/index.js +3 -0
- package/dist/schema/modules/namespace/functions/link.js +11 -0
- package/dist/schema/modules/namespace/functions/rename.js +11 -0
- package/dist/schema/modules/namespace/functions/unlink.js +11 -0
- package/dist/schema/modules/namespace/index.d.ts +2 -0
- package/dist/schema/modules/namespace/index.js +2 -0
- package/dist/schema/modules/namespace/types/index.js +1 -0
- package/dist/schema/modules/namespace/types/namespace-name.js +7 -0
- package/dist/schema/modules/user/classes/user.d.ts +1 -0
- package/dist/schema/modules/user/classes/user.js +2 -0
- package/dist/schema/schema.d.ts +195 -0
- package/dist/schema/schema.js +8 -2
- package/package.json +2 -2
package/dist/runtime.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { defineRuntime } from '@astrale-os/sdk/runtime';
|
|
2
2
|
import { listEntrypoints } from './functions/application/index.js';
|
|
3
3
|
import { assignMember, unassignMember } from './functions/group/index.js';
|
|
4
|
+
import { link, rename, unlink } from './functions/namespace/index.js';
|
|
4
5
|
import { invite } from './functions/user/index.js';
|
|
5
6
|
import { integrations } from './integrations/index.js';
|
|
6
7
|
import { enrollmentProvider } from './providers/admin-enrollment/index.js';
|
|
7
8
|
const initialize = (environment) => ({
|
|
8
9
|
providers: { enrollment: enrollmentProvider(environment) },
|
|
9
10
|
});
|
|
10
|
-
const functions = [
|
|
11
|
+
const functions = [
|
|
12
|
+
invite,
|
|
13
|
+
assignMember,
|
|
14
|
+
unassignMember,
|
|
15
|
+
listEntrypoints,
|
|
16
|
+
link,
|
|
17
|
+
unlink,
|
|
18
|
+
rename,
|
|
19
|
+
];
|
|
11
20
|
const runtime = defineRuntime()({
|
|
12
21
|
integrations,
|
|
13
22
|
initialize,
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export { User } from './modules/user/index.js';
|
|
|
3
3
|
export type { InvitationSummary } from './modules/user/index.js';
|
|
4
4
|
export { Group, member_of_group, adminGroup, applicationsGroup, memberGroup, } from './modules/group/index.js';
|
|
5
5
|
export { listEntrypoints, type EntrypointEntry } from './modules/application/index.js';
|
|
6
|
+
export { Namespace, alias, viewsNamespace } from './modules/namespace/index.js';
|
package/dist/schema/index.js
CHANGED
|
@@ -2,3 +2,4 @@ export { ShellSchema, S } from './schema.js';
|
|
|
2
2
|
export { User } from './modules/user/index.js';
|
|
3
3
|
export { Group, member_of_group, adminGroup, applicationsGroup, memberGroup, } from './modules/group/index.js';
|
|
4
4
|
export { listEntrypoints } from './modules/application/index.js';
|
|
5
|
+
export { Namespace, alias, viewsNamespace } from './modules/namespace/index.js';
|
|
@@ -3,6 +3,8 @@ 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
|
+
// Domains that depend on Shell extend it with the groups they own.
|
|
7
|
+
inheritance: 'open',
|
|
6
8
|
policies: { read: true },
|
|
7
9
|
extends: [K.classes.Identity, K.classes.Named, K.classes.Descriptable],
|
|
8
10
|
methods: { assignMember, unassignMember },
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One name in a Namespace: the Edge slug is the name, the target any Node. The Kernel key keeps a
|
|
3
|
+
* name to one Node for every author; Edge identity keeps a Node to one alias per Namespace. The
|
|
4
|
+
* target accepts a Class Shell does not own, so the alias detaches with its Node.
|
|
5
|
+
*/
|
|
6
|
+
export declare const alias: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
7
|
+
readonly depth: 0;
|
|
8
|
+
readonly abstract: false;
|
|
9
|
+
readonly extends: readonly [];
|
|
10
|
+
readonly properties: never;
|
|
11
|
+
readonly source: {
|
|
12
|
+
readonly as: "namespace";
|
|
13
|
+
readonly outgoing: "0..*";
|
|
14
|
+
};
|
|
15
|
+
readonly target: {
|
|
16
|
+
readonly as: "node";
|
|
17
|
+
readonly incoming: "0..*";
|
|
18
|
+
};
|
|
19
|
+
readonly constraints: Record<never, never>;
|
|
20
|
+
readonly effectiveProperties: never;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { K, edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { Namespace } from './namespace.js';
|
|
3
|
+
/**
|
|
4
|
+
* One name in a Namespace: the Edge slug is the name, the target any Node. The Kernel key keeps a
|
|
5
|
+
* name to one Node for every author; Edge identity keeps a Node to one alias per Namespace. The
|
|
6
|
+
* target accepts a Class Shell does not own, so the alias detaches with its Node.
|
|
7
|
+
*/
|
|
8
|
+
export const alias = edgeClass.directed({
|
|
9
|
+
policies: { read: true, traverse: true },
|
|
10
|
+
source: { as: 'namespace', accepts: [() => Namespace], outgoing: '0..*' },
|
|
11
|
+
target: { as: 'node', accepts: [K.classes.Node], incoming: '0..*' },
|
|
12
|
+
unique: [['source', 'slug']],
|
|
13
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** A scope of names chosen by the instance: each `alias` Edge slug names one Node, once. */
|
|
2
|
+
export declare const Namespace: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
3
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
4
|
+
readonly policies: {
|
|
5
|
+
readonly read: true;
|
|
6
|
+
readonly traverse: true;
|
|
7
|
+
};
|
|
8
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
|
|
9
|
+
readonly methods: {
|
|
10
|
+
readonly link: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
11
|
+
name: string;
|
|
12
|
+
target: string;
|
|
13
|
+
}, {
|
|
14
|
+
readonly mode: 'value';
|
|
15
|
+
readonly value: Record<string, never>;
|
|
16
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
17
|
+
readonly unlink: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
18
|
+
name: string;
|
|
19
|
+
}, {
|
|
20
|
+
readonly mode: 'value';
|
|
21
|
+
readonly value: Record<string, never>;
|
|
22
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
23
|
+
readonly rename: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
24
|
+
name: string;
|
|
25
|
+
to: string;
|
|
26
|
+
}, {
|
|
27
|
+
readonly mode: 'value';
|
|
28
|
+
readonly value: Record<string, never>;
|
|
29
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { K, classIcon, nodeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { Signpost } from '@astrale-os/sdk/schema/icons';
|
|
3
|
+
import { link, rename, unlink } from '../functions/index.js';
|
|
4
|
+
/** A scope of names chosen by the instance: each `alias` Edge slug names one Node, once. */
|
|
5
|
+
export const Namespace = nodeClass({
|
|
6
|
+
icon: classIcon.lucide(Signpost),
|
|
7
|
+
policies: { read: true, traverse: true },
|
|
8
|
+
extends: [K.classes.Named, K.classes.Descriptable],
|
|
9
|
+
methods: { link, unlink, rename },
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { viewsNamespace } from './views-namespace.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { viewsNamespace } from './views-namespace.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { K, core } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { Namespace } from '../classes/namespace.js';
|
|
3
|
+
/** `/:shell.astrale.ai:core.views`: the names a visitor opens at `https://<instance>/v/<name>`. */
|
|
4
|
+
export const viewsNamespace = core.node(() => Namespace, {
|
|
5
|
+
[K.classes.Named.properties.name.key]: 'Views',
|
|
6
|
+
[K.classes.Descriptable.properties.description.key]: 'Aliases opened at /v/<name> on this instance.',
|
|
7
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { K, method, path } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { ownsClass, administersShellClass } from '../../../policies/index.js';
|
|
4
|
+
import { namespaceName } from '../types/index.js';
|
|
5
|
+
export const link = method({
|
|
6
|
+
description: 'Give one Node an alias in this Namespace.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
input: z.strictObject({ name: namespaceName, target: path(K.classes.Node) }),
|
|
9
|
+
output: z.object({}),
|
|
10
|
+
policy: ({ anyOf, check, self }) => anyOf(check(administersShellClass, self), check(ownsClass, self)),
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { ownsClass, administersShellClass } from '../../../policies/index.js';
|
|
4
|
+
import { namespaceName } from '../types/index.js';
|
|
5
|
+
export const rename = method({
|
|
6
|
+
description: 'Rename one alias of this Namespace; the Node it names stays the same.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
input: z.strictObject({ name: namespaceName, to: namespaceName }),
|
|
9
|
+
output: z.object({}),
|
|
10
|
+
policy: ({ anyOf, check, self }) => anyOf(check(administersShellClass, self), check(ownsClass, self)),
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { ownsClass, administersShellClass } from '../../../policies/index.js';
|
|
4
|
+
import { namespaceName } from '../types/index.js';
|
|
5
|
+
export const unlink = method({
|
|
6
|
+
description: 'Remove one alias from this Namespace.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
input: z.strictObject({ name: namespaceName }),
|
|
9
|
+
output: z.object({}),
|
|
10
|
+
policy: ({ anyOf, check, self }) => anyOf(check(administersShellClass, self), check(ownsClass, self)),
|
|
11
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { namespaceName } from './namespace-name.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A name as written after `/v/`. Portable value patterns match substrings only, so the exact
|
|
4
|
+
* grammar, a lower-case Edge slug, is the Namespace Actions' rule and its one refusal
|
|
5
|
+
* `INVALID_NAME`.
|
|
6
|
+
*/
|
|
7
|
+
export const namespaceName = z.string();
|
|
@@ -6,6 +6,8 @@ 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
|
+
// Domains that depend on Shell extend it with the accounts they own.
|
|
10
|
+
inheritance: 'open',
|
|
9
11
|
policies: { read: true },
|
|
10
12
|
extends: [K.classes.Identity],
|
|
11
13
|
properties: { creationKey },
|
package/dist/schema/schema.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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 inheritance: "open";
|
|
6
7
|
readonly policies: {
|
|
7
8
|
readonly read: true;
|
|
8
9
|
};
|
|
@@ -26,6 +27,7 @@ declare const classes: {
|
|
|
26
27
|
}>;
|
|
27
28
|
readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
28
29
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
30
|
+
readonly inheritance: "open";
|
|
29
31
|
readonly policies: {
|
|
30
32
|
readonly read: true;
|
|
31
33
|
};
|
|
@@ -63,6 +65,52 @@ declare const classes: {
|
|
|
63
65
|
readonly constraints: Record<never, never>;
|
|
64
66
|
readonly effectiveProperties: never;
|
|
65
67
|
}>;
|
|
68
|
+
readonly Namespace: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
69
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
70
|
+
readonly policies: {
|
|
71
|
+
readonly read: true;
|
|
72
|
+
readonly traverse: true;
|
|
73
|
+
};
|
|
74
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
|
|
75
|
+
readonly methods: {
|
|
76
|
+
readonly link: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
77
|
+
name: string;
|
|
78
|
+
target: string;
|
|
79
|
+
}, {
|
|
80
|
+
readonly mode: 'value';
|
|
81
|
+
readonly value: Record<string, never>;
|
|
82
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
83
|
+
readonly unlink: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
84
|
+
name: string;
|
|
85
|
+
}, {
|
|
86
|
+
readonly mode: 'value';
|
|
87
|
+
readonly value: Record<string, never>;
|
|
88
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
89
|
+
readonly rename: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
90
|
+
name: string;
|
|
91
|
+
to: string;
|
|
92
|
+
}, {
|
|
93
|
+
readonly mode: 'value';
|
|
94
|
+
readonly value: Record<string, never>;
|
|
95
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
readonly alias: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
99
|
+
readonly depth: 0;
|
|
100
|
+
readonly abstract: false;
|
|
101
|
+
readonly extends: readonly [];
|
|
102
|
+
readonly properties: never;
|
|
103
|
+
readonly source: {
|
|
104
|
+
readonly as: "namespace";
|
|
105
|
+
readonly outgoing: "0..*";
|
|
106
|
+
};
|
|
107
|
+
readonly target: {
|
|
108
|
+
readonly as: "node";
|
|
109
|
+
readonly incoming: "0..*";
|
|
110
|
+
};
|
|
111
|
+
readonly constraints: Record<never, never>;
|
|
112
|
+
readonly effectiveProperties: never;
|
|
113
|
+
}>;
|
|
66
114
|
};
|
|
67
115
|
export type ShellClasses = typeof classes;
|
|
68
116
|
declare const input: {
|
|
@@ -74,6 +122,7 @@ declare const input: {
|
|
|
74
122
|
readonly classes: {
|
|
75
123
|
readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
76
124
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
125
|
+
readonly inheritance: "open";
|
|
77
126
|
readonly policies: {
|
|
78
127
|
readonly read: true;
|
|
79
128
|
};
|
|
@@ -97,6 +146,7 @@ declare const input: {
|
|
|
97
146
|
}>;
|
|
98
147
|
readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
99
148
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
149
|
+
readonly inheritance: "open";
|
|
100
150
|
readonly policies: {
|
|
101
151
|
readonly read: true;
|
|
102
152
|
};
|
|
@@ -134,6 +184,52 @@ declare const input: {
|
|
|
134
184
|
readonly constraints: Record<never, never>;
|
|
135
185
|
readonly effectiveProperties: never;
|
|
136
186
|
}>;
|
|
187
|
+
readonly Namespace: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
188
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
189
|
+
readonly policies: {
|
|
190
|
+
readonly read: true;
|
|
191
|
+
readonly traverse: true;
|
|
192
|
+
};
|
|
193
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
|
|
194
|
+
readonly methods: {
|
|
195
|
+
readonly link: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
196
|
+
name: string;
|
|
197
|
+
target: string;
|
|
198
|
+
}, {
|
|
199
|
+
readonly mode: 'value';
|
|
200
|
+
readonly value: Record<string, never>;
|
|
201
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
202
|
+
readonly unlink: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
203
|
+
name: string;
|
|
204
|
+
}, {
|
|
205
|
+
readonly mode: 'value';
|
|
206
|
+
readonly value: Record<string, never>;
|
|
207
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
208
|
+
readonly rename: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
209
|
+
name: string;
|
|
210
|
+
to: string;
|
|
211
|
+
}, {
|
|
212
|
+
readonly mode: 'value';
|
|
213
|
+
readonly value: Record<string, never>;
|
|
214
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
215
|
+
};
|
|
216
|
+
}>;
|
|
217
|
+
readonly alias: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
218
|
+
readonly depth: 0;
|
|
219
|
+
readonly abstract: false;
|
|
220
|
+
readonly extends: readonly [];
|
|
221
|
+
readonly properties: never;
|
|
222
|
+
readonly source: {
|
|
223
|
+
readonly as: "namespace";
|
|
224
|
+
readonly outgoing: "0..*";
|
|
225
|
+
};
|
|
226
|
+
readonly target: {
|
|
227
|
+
readonly as: "node";
|
|
228
|
+
readonly incoming: "0..*";
|
|
229
|
+
};
|
|
230
|
+
readonly constraints: Record<never, never>;
|
|
231
|
+
readonly effectiveProperties: never;
|
|
232
|
+
}>;
|
|
137
233
|
};
|
|
138
234
|
readonly functions: {
|
|
139
235
|
readonly listEntrypoints: import("@astrale-os/sdk/schema").Function<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
@@ -161,6 +257,7 @@ declare const input: {
|
|
|
161
257
|
readonly admin: import("@astrale-os/sdk/schema").CoreNode;
|
|
162
258
|
readonly applications: import("@astrale-os/sdk/schema").CoreNode;
|
|
163
259
|
readonly member: import("@astrale-os/sdk/schema").CoreNode;
|
|
260
|
+
readonly views: import("@astrale-os/sdk/schema").CoreNode;
|
|
164
261
|
};
|
|
165
262
|
};
|
|
166
263
|
};
|
|
@@ -171,6 +268,7 @@ export declare const ShellSchema: import("@astrale-os/sdk/schema").AuthoredSchem
|
|
|
171
268
|
readonly classes: {
|
|
172
269
|
readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
173
270
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
271
|
+
readonly inheritance: "open";
|
|
174
272
|
readonly policies: {
|
|
175
273
|
readonly read: true;
|
|
176
274
|
};
|
|
@@ -194,6 +292,7 @@ export declare const ShellSchema: import("@astrale-os/sdk/schema").AuthoredSchem
|
|
|
194
292
|
}>;
|
|
195
293
|
readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
196
294
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
295
|
+
readonly inheritance: "open";
|
|
197
296
|
readonly policies: {
|
|
198
297
|
readonly read: true;
|
|
199
298
|
};
|
|
@@ -231,6 +330,52 @@ export declare const ShellSchema: import("@astrale-os/sdk/schema").AuthoredSchem
|
|
|
231
330
|
readonly constraints: Record<never, never>;
|
|
232
331
|
readonly effectiveProperties: never;
|
|
233
332
|
}>;
|
|
333
|
+
readonly Namespace: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
334
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
335
|
+
readonly policies: {
|
|
336
|
+
readonly read: true;
|
|
337
|
+
readonly traverse: true;
|
|
338
|
+
};
|
|
339
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
|
|
340
|
+
readonly methods: {
|
|
341
|
+
readonly link: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
342
|
+
name: string;
|
|
343
|
+
target: string;
|
|
344
|
+
}, {
|
|
345
|
+
readonly mode: 'value';
|
|
346
|
+
readonly value: Record<string, never>;
|
|
347
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
348
|
+
readonly unlink: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
349
|
+
name: string;
|
|
350
|
+
}, {
|
|
351
|
+
readonly mode: 'value';
|
|
352
|
+
readonly value: Record<string, never>;
|
|
353
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
354
|
+
readonly rename: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
355
|
+
name: string;
|
|
356
|
+
to: string;
|
|
357
|
+
}, {
|
|
358
|
+
readonly mode: 'value';
|
|
359
|
+
readonly value: Record<string, never>;
|
|
360
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
361
|
+
};
|
|
362
|
+
}>;
|
|
363
|
+
readonly alias: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
364
|
+
readonly depth: 0;
|
|
365
|
+
readonly abstract: false;
|
|
366
|
+
readonly extends: readonly [];
|
|
367
|
+
readonly properties: never;
|
|
368
|
+
readonly source: {
|
|
369
|
+
readonly as: "namespace";
|
|
370
|
+
readonly outgoing: "0..*";
|
|
371
|
+
};
|
|
372
|
+
readonly target: {
|
|
373
|
+
readonly as: "node";
|
|
374
|
+
readonly incoming: "0..*";
|
|
375
|
+
};
|
|
376
|
+
readonly constraints: Record<never, never>;
|
|
377
|
+
readonly effectiveProperties: never;
|
|
378
|
+
}>;
|
|
234
379
|
};
|
|
235
380
|
readonly functions: {
|
|
236
381
|
readonly listEntrypoints: import("@astrale-os/sdk/schema").Function<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
@@ -258,6 +403,7 @@ export declare const ShellSchema: import("@astrale-os/sdk/schema").AuthoredSchem
|
|
|
258
403
|
readonly admin: import("@astrale-os/sdk/schema").CoreNode;
|
|
259
404
|
readonly applications: import("@astrale-os/sdk/schema").CoreNode;
|
|
260
405
|
readonly member: import("@astrale-os/sdk/schema").CoreNode;
|
|
406
|
+
readonly views: import("@astrale-os/sdk/schema").CoreNode;
|
|
261
407
|
};
|
|
262
408
|
};
|
|
263
409
|
}, {
|
|
@@ -270,6 +416,7 @@ export declare const S: schema.ResolvedDomainOf<import("@astrale-os/sdk/schema")
|
|
|
270
416
|
readonly classes: {
|
|
271
417
|
readonly User: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
272
418
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
419
|
+
readonly inheritance: "open";
|
|
273
420
|
readonly policies: {
|
|
274
421
|
readonly read: true;
|
|
275
422
|
};
|
|
@@ -293,6 +440,7 @@ export declare const S: schema.ResolvedDomainOf<import("@astrale-os/sdk/schema")
|
|
|
293
440
|
}>;
|
|
294
441
|
readonly Group: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
295
442
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
443
|
+
readonly inheritance: "open";
|
|
296
444
|
readonly policies: {
|
|
297
445
|
readonly read: true;
|
|
298
446
|
};
|
|
@@ -330,6 +478,52 @@ export declare const S: schema.ResolvedDomainOf<import("@astrale-os/sdk/schema")
|
|
|
330
478
|
readonly constraints: Record<never, never>;
|
|
331
479
|
readonly effectiveProperties: never;
|
|
332
480
|
}>;
|
|
481
|
+
readonly Namespace: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
482
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
483
|
+
readonly policies: {
|
|
484
|
+
readonly read: true;
|
|
485
|
+
readonly traverse: true;
|
|
486
|
+
};
|
|
487
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">];
|
|
488
|
+
readonly methods: {
|
|
489
|
+
readonly link: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
490
|
+
name: string;
|
|
491
|
+
target: string;
|
|
492
|
+
}, {
|
|
493
|
+
readonly mode: 'value';
|
|
494
|
+
readonly value: Record<string, never>;
|
|
495
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
496
|
+
readonly unlink: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
497
|
+
name: string;
|
|
498
|
+
}, {
|
|
499
|
+
readonly mode: 'value';
|
|
500
|
+
readonly value: Record<string, never>;
|
|
501
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
502
|
+
readonly rename: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
503
|
+
name: string;
|
|
504
|
+
to: string;
|
|
505
|
+
}, {
|
|
506
|
+
readonly mode: 'value';
|
|
507
|
+
readonly value: Record<string, never>;
|
|
508
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
509
|
+
};
|
|
510
|
+
}>;
|
|
511
|
+
readonly alias: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
512
|
+
readonly depth: 0;
|
|
513
|
+
readonly abstract: false;
|
|
514
|
+
readonly extends: readonly [];
|
|
515
|
+
readonly properties: never;
|
|
516
|
+
readonly source: {
|
|
517
|
+
readonly as: "namespace";
|
|
518
|
+
readonly outgoing: "0..*";
|
|
519
|
+
};
|
|
520
|
+
readonly target: {
|
|
521
|
+
readonly as: "node";
|
|
522
|
+
readonly incoming: "0..*";
|
|
523
|
+
};
|
|
524
|
+
readonly constraints: Record<never, never>;
|
|
525
|
+
readonly effectiveProperties: never;
|
|
526
|
+
}>;
|
|
333
527
|
};
|
|
334
528
|
readonly functions: {
|
|
335
529
|
readonly listEntrypoints: import("@astrale-os/sdk/schema").Function<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
@@ -357,6 +551,7 @@ export declare const S: schema.ResolvedDomainOf<import("@astrale-os/sdk/schema")
|
|
|
357
551
|
readonly admin: import("@astrale-os/sdk/schema").CoreNode;
|
|
358
552
|
readonly applications: import("@astrale-os/sdk/schema").CoreNode;
|
|
359
553
|
readonly member: import("@astrale-os/sdk/schema").CoreNode;
|
|
554
|
+
readonly views: import("@astrale-os/sdk/schema").CoreNode;
|
|
360
555
|
};
|
|
361
556
|
};
|
|
362
557
|
}, {
|
package/dist/schema/schema.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { defineSchema, KernelSchema, schema } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { listEntrypoints } from './modules/application/index.js';
|
|
3
3
|
import { Group, member_of_group, adminGroup, applicationsGroup, memberGroup, belongsToGroup, } from './modules/group/index.js';
|
|
4
|
+
import { Namespace, alias, viewsNamespace } from './modules/namespace/index.js';
|
|
4
5
|
import { User } from './modules/user/index.js';
|
|
5
6
|
import { ownsClass, administersShellClass, usesFunction } from './policies/index.js';
|
|
6
7
|
import { applicationView } from './views/index.js';
|
|
7
8
|
export const ORIGIN = 'shell.astrale.ai';
|
|
8
9
|
const dependencies = { kernel: KernelSchema };
|
|
9
|
-
const classes = { User, Group, member_of_group };
|
|
10
|
+
const classes = { User, Group, member_of_group, Namespace, alias };
|
|
10
11
|
const functions = { listEntrypoints };
|
|
11
12
|
const policies = { belongsToGroup, ownsClass, administersShellClass, usesFunction };
|
|
12
13
|
const views = { application: applicationView };
|
|
13
14
|
const core = {
|
|
14
|
-
nodes: {
|
|
15
|
+
nodes: {
|
|
16
|
+
admin: adminGroup,
|
|
17
|
+
applications: applicationsGroup,
|
|
18
|
+
member: memberGroup,
|
|
19
|
+
views: viewsNamespace,
|
|
20
|
+
},
|
|
15
21
|
};
|
|
16
22
|
const input = {
|
|
17
23
|
name: 'Shell',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/shell",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.48",
|
|
4
4
|
"description": "Astrale Shell Domain schema and remote product implementation",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"vitest": "5.0.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@astrale-os/sdk": ">=0.6.0-beta.
|
|
79
|
+
"@astrale-os/sdk": ">=0.6.0-beta.37 <1.0.0"
|
|
80
80
|
},
|
|
81
81
|
"devEngines": {
|
|
82
82
|
"runtime": {
|