@astrale-domains/shell-schema 0.3.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAIrE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB;;;;;GAKG;AACH,eAAO,MAAM,cAAc,6DAE1B,CAAA;AAED,gFAAgF;AAChF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIpB,yEAAyE;QACzE,MAAM;QACN;;gCAEwB;QACxB,IAAI;;;QAGJ;;;;;;;;;;;;;;WAcG;QACH,OAAO;;;;;;;;QAQP;;;;;WAKG;QACH,SAAS;;;;;QAWT;;;;WAIG;QACH,UAAU;;;;QAGV;;;;;;;;;;;;;;;WAeG;QACH,IAAI;;;;;;;;;;;QAeJ;;;;;;;;;;;WAWG;QACH,cAAc;;;;;;;;;;;QAnGd,yEAAyE;;QAEzE;;gCAEwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyG1B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAhC7E;;;;;;;eAOG;;;;YAEH;;;;;;eAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBL,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;EAGxB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;EAGrB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;EAA4E,CAAA;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAA"}
@@ -0,0 +1,200 @@
1
+ import { edgeClass, KernelSchema, nodeClass, nodeInterface } from '@astrale-os/kernel-core';
2
+ import { fn } from '@astrale-os/kernel-dsl';
3
+ import { z } from 'zod';
4
+ import { APPLICATION_ICON, ROLE_ICON } from './icons';
5
+ import { iUser } from './identity';
6
+ import { iSpace } from './space';
7
+ /**
8
+ * The user-mintable delegation expression `app::open` / `app::getAccessToken`
9
+ * hand back — typed precisely as the kernel's `UnresolvedIdentityExpr` (so the
10
+ * `*Result` types infer it directly) and validated structurally as an object
11
+ * (the exact kernel validator isn't reachable from a worker bundle).
12
+ */
13
+ export const delegationExpr = z.custom((v) => v !== null && typeof v === 'object');
14
+ /** An installed application — an Identity living inside the Space it serves. */
15
+ export const Application = nodeClass({
16
+ implements: [KernelSchema.interfaces.Identity],
17
+ icon: APPLICATION_ICON,
18
+ props: {
19
+ /** The app's source — the origin of the domain it was installed from. */
20
+ origin: z.string(),
21
+ /** The app's logo — an inline SVG string or a `data:` URL, lifted from the
22
+ * target domain's `/meta` manifest at install time. Optional (a domain need
23
+ * not declare one). */
24
+ logo: z.string().optional(),
25
+ },
26
+ methods: {
27
+ /**
28
+ * `Application.install(target, space)` — install an application INTO a space.
29
+ * `target` is the app's source — either a serving worker url (`https://…`,
30
+ * resolved to its declared origin via `/meta`) OR a bare origin. The target
31
+ * MUST be among the domains installed on this instance; otherwise the
32
+ * install is refused. The CALLER must hold EDIT on the space.
33
+ *
34
+ * Idempotent: re-installing the same origin into the same space adopts the
35
+ * existing app. Registers the target domain's declared ROLES (manifest
36
+ * `roles`) + the per-domain roles umbrella on first install, materializes
37
+ * the Application identity in the space's default `apps` folder (resolved via the
38
+ * `default_location` edge), links `installed_in` → space and `of_domain` →
39
+ * Domain, pins the `entrypoint` view when the manifest declares one, and
40
+ * assigns the caller the domain's DEFAULT roles.
41
+ */
42
+ install: fn({
43
+ static: true,
44
+ params: {
45
+ target: z.string().min(1),
46
+ space: z.string().min(1),
47
+ },
48
+ returns: z.object({ id: z.string(), path: z.string(), origin: z.string() }),
49
+ }),
50
+ /**
51
+ * `Application.available()` — the domains installed on this instance, enriched with
52
+ * each one's `/meta` manifest `logo` where reachable. The catalog a user picks
53
+ * from to `install` an app (labelled by `origin`). A domain whose `/meta` fails
54
+ * still appears (without `logo`).
55
+ */
56
+ available: fn({
57
+ static: true,
58
+ params: {},
59
+ returns: z.array(z.object({
60
+ origin: z.string(),
61
+ url: z.string().optional(),
62
+ logo: z.string().optional(),
63
+ })),
64
+ }),
65
+ /**
66
+ * `app::entrypoint()` — the app's entry View, resolved by walking the SEMANTIC
67
+ * `entrypoint` edge (Application → View), never by reconstructing a path. Returns the
68
+ * View ref (filtered by the caller's READ), or `null` when none is pinned.
69
+ */
70
+ entrypoint: fn({
71
+ returns: z.object({ id: z.string(), path: z.string() }).nullable(),
72
+ }),
73
+ /**
74
+ * `app::open()` — step 1 of the three-call app-opening protocol (caller
75
+ * gate: USE on the app). Resolves the entry view, mints the app's
76
+ * kernel-issued self bearer (`appCredential` — the app holds NO capability
77
+ * beyond its explicit node grants), and returns the READY-TO-MINT
78
+ * `delegation` expression:
79
+ *
80
+ * union( scope(self, {nodes: [installed domains]}),
81
+ * intersect( scope(self, {nodes: [/spaces]}),
82
+ * credential(appCredential) ) )
83
+ *
84
+ * The USER mints it verbatim (step 2 — the kernel's delegation mint is
85
+ * self-only): `@you::mintDelegationCredential({ delegation })`, then hands
86
+ * the envelope to `getAccessToken` (step 3) for the app token; refreshes
87
+ * loop on steps 2–3 (each `getAccessToken` returns the next expression).
88
+ */
89
+ open: fn({
90
+ returns: z.object({
91
+ view: z
92
+ .object({
93
+ id: z.string(),
94
+ path: z.string(),
95
+ url: z.string().optional(),
96
+ handshake: z.string().optional(),
97
+ })
98
+ .nullable(),
99
+ appCredential: z.string(),
100
+ delegation: delegationExpr,
101
+ expiresAt: z.number(),
102
+ }),
103
+ }),
104
+ /**
105
+ * `app::getAccessToken(delegation)` — exchange the USER-MINTED envelope
106
+ * (step 2) for the APP TOKEN, minted AS the app:
107
+ * `union(selfApp, delegatedUserToken)` — the app's own explicit grants
108
+ * plus the user-signed, pre-attenuated authority, nothing more (the
109
+ * attenuation lives inside the user's signature). Sub = the app; audience
110
+ * = the app's backend. Refused when the envelope's subject isn't the
111
+ * caller. REFRESH-CAPABLE: the result carries the NEXT ready-to-mint
112
+ * `delegation` expression (armed with the fresh `appCredential`), so
113
+ * refreshing loops on the user mint + this call alone — `open` is only
114
+ * needed once, for the view.
115
+ */
116
+ getAccessToken: fn({
117
+ params: { delegation: z.string().min(1) },
118
+ returns: z.object({
119
+ credential: z.string(),
120
+ expiresAt: z.number(),
121
+ delegation: delegationExpr,
122
+ appCredential: z.string(),
123
+ }),
124
+ }),
125
+ },
126
+ });
127
+ /**
128
+ * `Role` (interface) — a capability identity a DOMAIN declares (manifest
129
+ * `roles`) and a USER is assigned (`assign`). Holding a role composes its
130
+ * permissions onto the user via `extendIdentity` — the same mechanism as Group
131
+ * membership. The domain itself grants each role its resource permissions.
132
+ */
133
+ export const iRole = nodeInterface({
134
+ extends: [KernelSchema.interfaces.Identity],
135
+ methods: {
136
+ /**
137
+ * `role::assign(user)` — assign this role to a user: records the semantic
138
+ * `has_role` edge AND extends the user's identity with the role
139
+ * (`extendIdentity`), so the role's permissions genuinely compose onto the
140
+ * user. Kernel-gated: the caller needs EDIT on the user and SHARE on the
141
+ * role (default roles carry a users-group SHARE grant — self-assignable).
142
+ * Idempotent.
143
+ */
144
+ assign: fn({ params: { user: z.string().min(1) }, returns: z.void() }),
145
+ /**
146
+ * `role::unassign(user)` — the idempotent inverse of `assign`: removes the
147
+ * `has_role` edge AND reverses the identity composition (`removeExtension`),
148
+ * so the role's permissions no longer compose onto the user. Same gate as
149
+ * `assign` (SHARE on the role + EDIT on the user unless self). Not assigned
150
+ * already ⇒ no-op.
151
+ */
152
+ unassign: fn({ params: { user: z.string().min(1) }, returns: z.void() }),
153
+ },
154
+ });
155
+ /** The DEFAULT `Role` — implements the `Role` interface. Role nodes live under
156
+ * `/domains/<origin-slug>/roles`; the parent node of a domain's roles is
157
+ * itself a Role — the ROLES UMBRELLA (`RolesIdentity`), extended with every
158
+ * role of the domain so it embodies their union at authorization time. */
159
+ export const Role = nodeClass({
160
+ implements: [iRole],
161
+ icon: ROLE_ICON,
162
+ props: {
163
+ /** Declared `default: true` — auto-assigned to the installing user; carries
164
+ * a users-group SHARE grant (self-assignable). Registered from the
165
+ * domain's manifest at first app install. */
166
+ default: z.boolean().optional(),
167
+ /** What holding this role means — from the domain's manifest declaration. */
168
+ description: z.string().optional(),
169
+ },
170
+ });
171
+ /**
172
+ * Where an app is installed: an Application instance lives in a SINGLE Space (at most one
173
+ * `installed_in` per app — you can't install one app instance in two spaces). A
174
+ * Space holds many apps; we mint a distinct Application instance per space even when two
175
+ * installs point at the same origin.
176
+ */
177
+ export const installed_in = edgeClass({ as: 'app', types: [Application], cardinality: '0..1' }, { as: 'space', types: [iSpace] });
178
+ /**
179
+ * The domain an Application or Role belongs to: an Application targets exactly one domain (a
180
+ * domain can back many apps); a Role is declared by exactly one domain. `0..1`
181
+ * is the safe write-time bound. For an Application it's MANDATORY —
182
+ * `Application.install` resolves the target origin's Domain node (which must exist, since
183
+ * the target is an installed domain) and links it.
184
+ */
185
+ export const of_domain = edgeClass({ as: 'member', types: [Application, Role], cardinality: '0..1' }, { as: 'domain', types: [KernelSchema.classes.Domain] });
186
+ /**
187
+ * A user's role membership — the semantic, queryable side of role assignment
188
+ * (the permission composition is done via `extendIdentity`). Typed on the
189
+ * INTERFACES so any implementer (a foreign `Agent` as user, a specialized role
190
+ * class) participates.
191
+ */
192
+ export const has_role = edgeClass({ as: 'user', types: [iUser] }, { as: 'role', types: [iRole] });
193
+ /**
194
+ * An app's entry surface — the View shown when the app opens, specific per app.
195
+ * At most one. Set by `Application.install` when the target domain's `/meta` manifest
196
+ * declares an `entrypoint` slug (resolved as `/:<origin>:view.<slug>`, then
197
+ * pinned to the resolved View node).
198
+ */
199
+ export const entrypoint = edgeClass({ as: 'app', types: [Application], cardinality: '0..1' }, { as: 'view', types: [KernelSchema.classes.View] });
200
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../application.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC3F,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAA;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC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CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CACvD,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAEjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CACjC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,MAAe,EAAE,EACjE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CACnD,CAAA"}
@@ -0,0 +1,11 @@
1
+ /** lucide `user` — a person. */
2
+ export declare const USER_ICON: string;
3
+ /** lucide `users` — an identity group (a team). */
4
+ export declare const GROUP_ICON: string;
5
+ /** lucide `layout-grid` — a per-user space (workspace surface). */
6
+ export declare const SPACE_ICON: string;
7
+ /** lucide `app-window` — an installed application. */
8
+ export declare const APPLICATION_ICON: string;
9
+ /** lucide `shield-check` — a role (a scoped grant of permissions). */
10
+ export declare const ROLE_ICON: string;
11
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../icons.ts"],"names":[],"mappings":"AAYA,gCAAgC;AAChC,eAAO,MAAM,SAAS,QAErB,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,UAAU,QAEtB,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,UAAU,QAEtB,CAAA;AAED,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,QAE5B,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,SAAS,QAErB,CAAA"}
package/dist/icons.js ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Class-level icons for the shell domain's node classes.
3
+ *
4
+ * Each is raw SVG markup passed to `nodeClass({ icon })`, materialized onto the
5
+ * class `self` node (the kernel `Iconable.icon` property) at install. Clients
6
+ * resolve an instance's icon through its class. Markup is lifted verbatim from
7
+ * lucide (ISC) icon node data; `stroke="currentColor"` so the glyph follows
8
+ * text color — the same convention the kernel's structural classes use.
9
+ */
10
+ const svg = (body) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`;
11
+ /** lucide `user` — a person. */
12
+ export const USER_ICON = svg('<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>');
13
+ /** lucide `users` — an identity group (a team). */
14
+ export const GROUP_ICON = svg('<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>');
15
+ /** lucide `layout-grid` — a per-user space (workspace surface). */
16
+ export const SPACE_ICON = svg('<rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/>');
17
+ /** lucide `app-window` — an installed application. */
18
+ export const APPLICATION_ICON = svg('<rect x="2" y="4" width="20" height="16" rx="2"/><path d="M10 4v4"/><path d="M2 8h20"/><path d="M6 4v4"/>');
19
+ /** lucide `shield-check` — a role (a scoped grant of permissions). */
20
+ export const ROLE_ICON = svg('<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>');
21
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,GAAG,GAAG,CAAC,IAAY,EAAU,EAAE,CACnC,iKAAiK,IAAI,QAAQ,CAAA;AAE/K,gCAAgC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,qFAAqF,CACtF,CAAA;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,+JAA+J,CAChK,CAAA;AAED,mEAAmE;AACnE,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,kMAAkM,CACnM,CAAA;AAED,sDAAsD;AACtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CACjC,2GAA2G,CAC5G,CAAA;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,yMAAyM,CAC1M,CAAA"}