@astrale-os/shell 0.3.0 → 0.3.2
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/dist/application/apps.d.ts +4 -4
- package/dist/application/apps.d.ts.map +1 -1
- package/dist/application/apps.js +5 -9
- package/dist/application/namespaces.d.ts +4 -4
- package/dist/application/namespaces.d.ts.map +1 -1
- package/dist/application/namespaces.js +4 -4
- package/dist/application/session/open.d.ts +2 -2
- package/dist/application/session/open.d.ts.map +1 -1
- package/dist/application/session/open.js +1 -1
- package/dist/application/session/session.d.ts +1 -1
- package/dist/application/session/session.d.ts.map +1 -1
- package/dist/application/session/token.d.ts +1 -1
- package/dist/application/session/token.d.ts.map +1 -1
- package/dist/application/session/token.js +2 -2
- package/dist/application/spaces.d.ts +3 -3
- package/dist/application/spaces.d.ts.map +1 -1
- package/dist/application/spaces.js +3 -6
- package/dist/application/user.d.ts +4 -4
- package/dist/application/user.d.ts.map +1 -1
- package/dist/application/user.js +6 -6
- package/dist/application/view.d.ts +8 -4
- package/dist/application/view.d.ts.map +1 -1
- package/dist/application/view.js +3 -3
- package/dist/channel/children.d.ts +3 -3
- package/dist/channel/children.d.ts.map +1 -1
- package/dist/channel/listeners.d.ts +1 -1
- package/dist/channel/listeners.d.ts.map +1 -1
- package/dist/channel/message-port.d.ts +1 -1
- package/dist/channel/message-port.d.ts.map +1 -1
- package/dist/channel/observer.d.ts +1 -1
- package/dist/channel/observer.d.ts.map +1 -1
- package/dist/channel/parent.d.ts +3 -3
- package/dist/channel/parent.d.ts.map +1 -1
- package/dist/channel/parent.js +1 -1
- package/dist/channel/transport.d.ts +1 -1
- package/dist/channel/transport.d.ts.map +1 -1
- package/dist/index.d.ts +56 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -20
- package/dist/intent/middleware/capabilities.d.ts +3 -3
- package/dist/intent/middleware/capabilities.d.ts.map +1 -1
- package/dist/intent/middleware/logging.d.ts +1 -1
- package/dist/intent/middleware/logging.d.ts.map +1 -1
- package/dist/intent/middleware/rate-limit.d.ts +2 -2
- package/dist/intent/middleware/rate-limit.d.ts.map +1 -1
- package/dist/intent/pipeline.d.ts +1 -1
- package/dist/intent/pipeline.d.ts.map +1 -1
- package/dist/intent/policy.d.ts +2 -2
- package/dist/intent/policy.d.ts.map +1 -1
- package/dist/intent/request.d.ts +3 -3
- package/dist/intent/request.d.ts.map +1 -1
- package/dist/intent/router.d.ts +6 -6
- package/dist/intent/router.d.ts.map +1 -1
- package/dist/intent/router.js +1 -1
- package/dist/kernel/credential.d.ts +2 -2
- package/dist/kernel/credential.d.ts.map +1 -1
- package/dist/kernel/delegated.d.ts +3 -3
- package/dist/kernel/delegated.d.ts.map +1 -1
- package/dist/kernel/delegated.js +1 -1
- package/dist/kernel/delegation/refresh.d.ts +1 -1
- package/dist/kernel/delegation/refresh.d.ts.map +1 -1
- package/dist/kernel/delegation/refresh.js +1 -1
- package/dist/message/message.d.ts +3 -3
- package/dist/message/message.d.ts.map +1 -1
- package/dist/shell/access.d.ts +2 -2
- package/dist/shell/access.d.ts.map +1 -1
- package/dist/shell/access.js +1 -1
- package/dist/shell/build.d.ts +11 -11
- package/dist/shell/build.d.ts.map +1 -1
- package/dist/shell/build.js +1 -1
- package/dist/shell/config.d.ts +1 -1
- package/dist/shell/config.d.ts.map +1 -1
- package/dist/shell/create.d.ts +2 -2
- package/dist/shell/create.d.ts.map +1 -1
- package/dist/shell/create.js +2 -2
- package/dist/shell/sandboxed/boot.d.ts +4 -4
- package/dist/shell/sandboxed/boot.d.ts.map +1 -1
- package/dist/shell/sandboxed/boot.js +5 -5
- package/dist/shell/sandboxed/guarded.d.ts +2 -2
- package/dist/shell/sandboxed/guarded.d.ts.map +1 -1
- package/dist/shell/sandboxed/pending.d.ts +2 -2
- package/dist/shell/sandboxed/pending.d.ts.map +1 -1
- package/dist/shell/sandboxed/sandboxed.d.ts +2 -2
- package/dist/shell/sandboxed/sandboxed.d.ts.map +1 -1
- package/dist/shell/sandboxed/sandboxed.js +10 -10
- package/dist/shell/shell.d.ts +12 -12
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/standalone.d.ts +2 -2
- package/dist/shell/standalone.d.ts.map +1 -1
- package/dist/shell/standalone.js +9 -9
- package/dist/window/capabilities.d.ts +1 -1
- package/dist/window/capabilities.d.ts.map +1 -1
- package/dist/window/embed/adapter.d.ts +1 -1
- package/dist/window/embed/adapter.d.ts.map +1 -1
- package/dist/window/embed/iframe.d.ts +1 -1
- package/dist/window/embed/iframe.d.ts.map +1 -1
- package/dist/window/lifecycle/states.d.ts +2 -2
- package/dist/window/lifecycle/states.d.ts.map +1 -1
- package/dist/window/lifecycle/states.js +1 -1
- package/dist/window/lifecycle/transition.d.ts +1 -1
- package/dist/window/lifecycle/transition.d.ts.map +1 -1
- package/dist/window/mount/close.d.ts +6 -6
- package/dist/window/mount/close.d.ts.map +1 -1
- package/dist/window/mount/credential.d.ts +5 -5
- package/dist/window/mount/credential.d.ts.map +1 -1
- package/dist/window/mount/credential.js +1 -1
- package/dist/window/mount/handshake.js +1 -1
- package/dist/window/mount/mount.d.ts +6 -6
- package/dist/window/mount/mount.d.ts.map +1 -1
- package/dist/window/mount/mount.js +5 -5
- package/dist/window/mount/params.d.ts +2 -2
- package/dist/window/mount/params.d.ts.map +1 -1
- package/dist/window/mount/plain.d.ts +5 -5
- package/dist/window/mount/plain.d.ts.map +1 -1
- package/dist/window/mount/plain.js +1 -1
- package/dist/window/window.d.ts +1 -1
- package/dist/window/window.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/application/apps.ts +9 -13
- package/src/application/namespaces.ts +8 -8
- package/src/application/session/open.ts +4 -4
- package/src/application/session/session.ts +1 -1
- package/src/application/session/token.ts +3 -3
- package/src/application/spaces.ts +6 -11
- package/src/application/user.ts +10 -10
- package/src/application/view.ts +11 -7
- package/src/channel/children.ts +3 -3
- package/src/channel/listeners.ts +1 -1
- package/src/channel/message-port.ts +2 -2
- package/src/channel/observer.ts +1 -1
- package/src/channel/parent.ts +4 -4
- package/src/channel/transport.ts +1 -1
- package/src/index.ts +56 -56
- package/src/intent/middleware/capabilities.ts +3 -3
- package/src/intent/middleware/logging.ts +2 -2
- package/src/intent/middleware/rate-limit.ts +2 -2
- package/src/intent/pipeline.ts +1 -1
- package/src/intent/policy.ts +2 -2
- package/src/intent/request.ts +3 -3
- package/src/intent/router.ts +7 -7
- package/src/kernel/credential.ts +2 -2
- package/src/kernel/delegated.ts +4 -4
- package/src/kernel/delegation/refresh.ts +2 -2
- package/src/message/message.ts +3 -3
- package/src/shell/access.ts +3 -3
- package/src/shell/build.ts +13 -13
- package/src/shell/config.ts +1 -1
- package/src/shell/create.ts +4 -4
- package/src/shell/sandboxed/boot.ts +9 -9
- package/src/shell/sandboxed/guarded.ts +2 -2
- package/src/shell/sandboxed/pending.ts +2 -2
- package/src/shell/sandboxed/sandboxed.ts +18 -18
- package/src/shell/shell.ts +12 -12
- package/src/shell/standalone.ts +13 -13
- package/src/window/capabilities.ts +1 -1
- package/src/window/embed/adapter.ts +1 -1
- package/src/window/embed/iframe.ts +2 -2
- package/src/window/lifecycle/states.ts +2 -2
- package/src/window/lifecycle/transition.ts +1 -1
- package/src/window/mount/close.ts +6 -6
- package/src/window/mount/credential.ts +5 -5
- package/src/window/mount/handshake.ts +3 -3
- package/src/window/mount/mount.ts +13 -13
- package/src/window/mount/params.ts +2 -2
- package/src/window/mount/plain.ts +6 -6
- package/src/window/window.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BoundNode, DefOf, NodeRefInput } from '@astrale-os/kernel-client';
|
|
2
|
-
import type { KernelClient } from '../kernel/client';
|
|
3
|
-
import type { AppSession } from './session/session';
|
|
4
|
-
import type {
|
|
2
|
+
import type { KernelClient } from '../kernel/client.js';
|
|
3
|
+
import type { AppSession } from './session/session.js';
|
|
4
|
+
import type { ShellView, ShellSchema } from './view.js';
|
|
5
5
|
/** An installed `Application` node. */
|
|
6
6
|
export type ApplicationNode = BoundNode<DefOf<ShellSchema, 'Application'>, ShellSchema>;
|
|
7
7
|
export interface AppsNamespace {
|
|
@@ -12,7 +12,7 @@ export interface AppsNamespace {
|
|
|
12
12
|
/** Resolve the app node and open its {@link AppSession}. */
|
|
13
13
|
open(app: NodeRefInput): Promise<AppSession>;
|
|
14
14
|
}
|
|
15
|
-
export declare function createAppsNamespace(kernel: KernelClient, v:
|
|
15
|
+
export declare function createAppsNamespace(kernel: KernelClient, v: ShellView, deps?: {
|
|
16
16
|
readonly now?: () => number;
|
|
17
17
|
}): AppsNamespace;
|
|
18
18
|
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/application/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAK/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/application/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAK/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAIvD,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC,EAAE,WAAW,CAAC,CAAA;AAEvF,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;IACtE,+DAA+D;IAC/D,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IACnD,4DAA4D;IAC5D,IAAI,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;CAC7C;AAKD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EACpB,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,GACrC,aAAa,CAyBf"}
|
package/dist/application/apps.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { D } from '@astrale-domains/shell-schema';
|
|
2
2
|
import { normalizeRef } from '@astrale-os/kernel-client';
|
|
3
|
-
import { openAppSession } from './session/open';
|
|
3
|
+
import { openAppSession } from './session/open.js';
|
|
4
4
|
/** The `installed_in` edge class — traversed to list a space's apps. */
|
|
5
5
|
const INSTALLED_IN_EDGE = D.installed_in.path.class.raw;
|
|
6
6
|
export function createAppsNamespace(kernel, v, deps) {
|
|
7
7
|
return {
|
|
8
8
|
async install(target, space) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
target,
|
|
13
|
-
space: normalizeRef(space),
|
|
14
|
-
}));
|
|
15
|
-
const app = await v.view().node('Application', `@${created.id}`);
|
|
9
|
+
const Application = v.get().classes.Application;
|
|
10
|
+
const created = await Application.install({ target, space: normalizeRef(space) });
|
|
11
|
+
const app = await Application.get(`@${created.id}`);
|
|
16
12
|
if (!app)
|
|
17
13
|
throw new Error(`Application.install: app @${created.id} is not readable`);
|
|
18
14
|
return app;
|
|
@@ -26,7 +22,7 @@ export function createAppsNamespace(kernel, v, deps) {
|
|
|
26
22
|
});
|
|
27
23
|
},
|
|
28
24
|
async open(app) {
|
|
29
|
-
const node = await v.
|
|
25
|
+
const node = await v.get().classes.Application.get(app);
|
|
30
26
|
if (!node)
|
|
31
27
|
throw new Error(`apps.open: application ${normalizeRef(app)} is not readable`);
|
|
32
28
|
return openAppSession({ kernel, ...(deps?.now ? { now: deps.now } : {}) }, node.id);
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* exactly these. Pure closures over a lazy typed view — constructing this
|
|
5
5
|
* touches no kernel (safe before a sandboxed shell's `init()`).
|
|
6
6
|
*/
|
|
7
|
-
import type { KernelClient } from '../kernel/client';
|
|
8
|
-
import type { AppsNamespace } from './apps';
|
|
9
|
-
import type { SpacesNamespace } from './spaces';
|
|
10
|
-
import type { UserNamespace } from './user';
|
|
7
|
+
import type { KernelClient } from '../kernel/client.js';
|
|
8
|
+
import type { AppsNamespace } from './apps.js';
|
|
9
|
+
import type { SpacesNamespace } from './spaces.js';
|
|
10
|
+
import type { UserNamespace } from './user.js';
|
|
11
11
|
export interface OsNamespaces {
|
|
12
12
|
readonly user: UserNamespace;
|
|
13
13
|
readonly spaces: SpacesNamespace;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../src/application/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../src/application/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAO9C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAC5B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,IAAI,CAAC,EAAE,sBAAsB,GAC5B,YAAY,CAOd"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createAppsNamespace } from './apps';
|
|
2
|
-
import { createSpacesNamespace } from './spaces';
|
|
3
|
-
import { createUserNamespace } from './user';
|
|
4
|
-
import { createShellDomainView } from './view';
|
|
1
|
+
import { createAppsNamespace } from './apps.js';
|
|
2
|
+
import { createSpacesNamespace } from './spaces.js';
|
|
3
|
+
import { createUserNamespace } from './user.js';
|
|
4
|
+
import { createShellDomainView } from './view.js';
|
|
5
5
|
export function createOsNamespaces(kernel, deps) {
|
|
6
6
|
const v = createShellDomainView(kernel);
|
|
7
7
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { KernelClient } from '../../kernel/client';
|
|
2
|
-
import type { AppSession } from './session';
|
|
1
|
+
import type { KernelClient } from '../../kernel/client.js';
|
|
2
|
+
import type { AppSession } from './session.js';
|
|
3
3
|
export interface OpenAppSessionDeps {
|
|
4
4
|
/** The shell kernel — dispatches AS THE USER, whose signature the delegate step needs. */
|
|
5
5
|
readonly kernel: KernelClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../src/application/session/open.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../src/application/session/open.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,cAAc,CAAA;AAYvD,MAAM,WAAW,kBAAkB;IACjC,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAA;IAC7B,8BAA8B;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAC5B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAC3B,OAAO,CAAC,UAAU,CAAC,CAuCrB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* server contract lives in the shell domain's `Application` methods
|
|
5
5
|
* (`runtime/application/{open,get-access-token}`).
|
|
6
6
|
*/
|
|
7
|
-
import type { MountCredential } from '../../window/mount/params';
|
|
7
|
+
import type { MountCredential } from '../../window/mount/params.js';
|
|
8
8
|
/** The entry view returned by `app::open`, described for mounting. */
|
|
9
9
|
export interface AppView {
|
|
10
10
|
readonly id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/application/session/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/application/session/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAEnE,sEAAsE;AACtE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IAC7B,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAA;IACpC,wFAAwF;IACxF,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACxB,2BAA2B;IAC3B,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,iGAAiG;AACjG,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,gBAAgB,CAAA;AAEvD,sFAAsF;AACtF,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,YAAY,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAIxE;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UnresolvedIdentityExpr } from '@astrale-os/kernel-core';
|
|
2
|
-
import type { KernelClient } from '../../kernel/client';
|
|
2
|
+
import type { KernelClient } from '../../kernel/client.js';
|
|
3
3
|
/** The current token, plus the recipe that mints its successor. */
|
|
4
4
|
export interface TokenSlot {
|
|
5
5
|
readonly token: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/application/session/token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/application/session/token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAc1D,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAA;CACxC;AAED,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,SAAS,GAAG,IAAI,CAAA;IAC3B,YAAY,IAAI,OAAO,CAAA;IACvB,kFAAkF;IAClF,OAAO,IAAI,OAAO,CAAC,SAAS,CAAC,CAAA;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,0FAA0F;IAC1F,MAAM,EAAE,YAAY,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,aAAa,EAAE,sBAAsB,CAAA;IACrC,GAAG,EAAE,MAAM,MAAM,CAAA;CAClB,GAAG,UAAU,CAgDb"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { REFRESH_WINDOW_MS } from '../../kernel/delegation/token';
|
|
2
|
-
import { AppSessionRefreshError } from './session';
|
|
1
|
+
import { REFRESH_WINDOW_MS } from '../../kernel/delegation/token.js';
|
|
2
|
+
import { AppSessionRefreshError } from './session.js';
|
|
3
3
|
export function createTokenCycle(opts) {
|
|
4
4
|
const { kernel, appId, now } = opts;
|
|
5
5
|
let slot = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BoundNode, DefOf, NodeRefInput } from '@astrale-os/kernel-client';
|
|
2
|
-
import type { KernelClient } from '../kernel/client';
|
|
3
|
-
import type {
|
|
2
|
+
import type { KernelClient } from '../kernel/client.js';
|
|
3
|
+
import type { ShellView, ShellSchema } from './view.js';
|
|
4
4
|
/** A workspace `Space` node. */
|
|
5
5
|
export type SpaceNode = BoundNode<DefOf<ShellSchema, 'Space'>, ShellSchema>;
|
|
6
6
|
export interface SpacesNamespace {
|
|
@@ -13,5 +13,5 @@ export interface SpacesNamespace {
|
|
|
13
13
|
name?: string;
|
|
14
14
|
}): Promise<SpaceNode>;
|
|
15
15
|
}
|
|
16
|
-
export declare function createSpacesNamespace(kernel: KernelClient, v:
|
|
16
|
+
export declare function createSpacesNamespace(kernel: KernelClient, v: ShellView): SpacesNamespace;
|
|
17
17
|
//# sourceMappingURL=spaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaces.d.ts","sourceRoot":"","sources":["../../src/application/spaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"spaces.d.ts","sourceRoot":"","sources":["../../src/application/spaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvD,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,CAAA;AAE3E,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,IAAI,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;IAC5B,uEAAuE;IACvE,GAAG,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IACjD,2DAA2D;IAC3D,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;CACrD;AAKD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,GAAG,eAAe,CAwBzF"}
|
|
@@ -16,12 +16,9 @@ export function createSpacesNamespace(kernel, v) {
|
|
|
16
16
|
return node ? v.bindAs('Space', node) : null;
|
|
17
17
|
},
|
|
18
18
|
async create(opts) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const create = v.view()('Space').create;
|
|
23
|
-
const created = await create(opts?.name !== undefined ? { name: opts.name } : undefined);
|
|
24
|
-
const space = await v.view().node('Space', `@${created.id}`);
|
|
19
|
+
const Space = v.get().classes.Space;
|
|
20
|
+
const created = await Space.create(opts?.name !== undefined ? { name: opts.name } : undefined);
|
|
21
|
+
const space = await Space.get(`@${created.id}`);
|
|
25
22
|
if (!space)
|
|
26
23
|
throw new Error(`Space.create: created space @${created.id} is not readable`);
|
|
27
24
|
return space;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BoundNode, DefOf, NodeRefInput } from '@astrale-os/kernel-client';
|
|
2
|
-
import type { KernelClient } from '../kernel/client';
|
|
3
|
-
import type { SpaceNode } from './spaces';
|
|
4
|
-
import type {
|
|
2
|
+
import type { KernelClient } from '../kernel/client.js';
|
|
3
|
+
import type { SpaceNode } from './spaces.js';
|
|
4
|
+
import type { ShellView, ShellSchema } from './view.js';
|
|
5
5
|
/** Self as the shell-domain `User` — typed `firstName`/`lastName`/`email`. */
|
|
6
6
|
export type UserNode = BoundNode<DefOf<ShellSchema, 'User'>, ShellSchema>;
|
|
7
7
|
/** A `Role` a user holds. */
|
|
@@ -16,5 +16,5 @@ export interface UserNamespace {
|
|
|
16
16
|
/** The `has_role` out-edges of self. */
|
|
17
17
|
roles(): Promise<RoleNode[]>;
|
|
18
18
|
}
|
|
19
|
-
export declare function createUserNamespace(kernel: KernelClient, v:
|
|
19
|
+
export declare function createUserNamespace(kernel: KernelClient, v: ShellView): UserNamespace;
|
|
20
20
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/application/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/application/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAIvD,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,CAAC,CAAA;AACzE,6BAA6B;AAC7B,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,CAAC,CAAA;AAEzE,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,EAAE,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAA;IACvB,yEAAyE;IACzE,YAAY,IAAI,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IACzC,sFAAsF;IACtF,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,wCAAwC;IACxC,KAAK,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,GAAG,aAAa,CA2BrF"}
|
package/dist/application/user.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { normalizeRef } from '@astrale-os/kernel-client';
|
|
2
|
-
import { asArray } from './view';
|
|
2
|
+
import { asArray } from './view.js';
|
|
3
3
|
export function createUserNamespace(kernel, v) {
|
|
4
4
|
async function me() {
|
|
5
|
-
return v.
|
|
5
|
+
return v.get().bind('User', await kernel.auth.whoami());
|
|
6
6
|
}
|
|
7
7
|
return {
|
|
8
8
|
me,
|
|
9
9
|
async currentSpace() {
|
|
10
10
|
const self = await me();
|
|
11
|
-
const first = asArray(await self.out('selected_space'))[0];
|
|
11
|
+
const first = asArray(await self.links.out('selected_space'))[0];
|
|
12
12
|
return first ? v.bindAs('Space', first.raw) : null;
|
|
13
13
|
},
|
|
14
14
|
async switchSpace(ref) {
|
|
15
15
|
const self = await me();
|
|
16
|
-
await self.
|
|
16
|
+
await self.switchSpace({ space: normalizeRef(ref) });
|
|
17
17
|
},
|
|
18
18
|
async roles() {
|
|
19
19
|
const self = await me();
|
|
20
|
-
return asArray(await self.out('has_role')).flatMap((
|
|
21
|
-
const role = v.bindAs('Role',
|
|
20
|
+
return asArray(await self.links.out('has_role')).flatMap((node) => {
|
|
21
|
+
const role = v.bindAs('Role', node.raw);
|
|
22
22
|
return role ? [role] : [];
|
|
23
23
|
});
|
|
24
24
|
},
|
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
* shell domain (`@astrale-domains/shell-schema`). The bound view is built LAZILY
|
|
4
4
|
* (first call) so the sandboxed shell's "init() first" kernel guard applies
|
|
5
5
|
* uniformly — constructing namespaces touches no kernel.
|
|
6
|
+
*
|
|
7
|
+
* Typed access uses `.classes`: `get().classes.Space(ref)` dispatches without
|
|
8
|
+
* a read and `get().classes.Space.get(ref)` returns a bound node.
|
|
6
9
|
*/
|
|
7
10
|
import type { BoundNode, DefOf, SchemaBoundView } from '@astrale-os/kernel-client';
|
|
8
11
|
import type { Node } from '@astrale-os/kernel-core';
|
|
9
12
|
import { schema } from '@astrale-domains/shell-schema';
|
|
10
|
-
import type { KernelClient } from '../kernel/client';
|
|
13
|
+
import type { KernelClient } from '../kernel/client.js';
|
|
11
14
|
export type ShellSchema = typeof schema;
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
/** Lazily-created schema-bound Shell client. */
|
|
16
|
+
export interface ShellView {
|
|
17
|
+
get(): SchemaBoundView<ShellSchema>;
|
|
14
18
|
/** Bind `node` as `type` when its concrete class satisfies it, else `null`. */
|
|
15
19
|
bindAs<T extends 'User' | 'Space' | 'Application' | 'Role'>(type: T, node: Node): BoundNode<DefOf<ShellSchema, T>, ShellSchema> | null;
|
|
16
20
|
}
|
|
17
|
-
export declare function createShellDomainView(kernel: KernelClient):
|
|
21
|
+
export declare function createShellDomainView(kernel: KernelClient): ShellView;
|
|
18
22
|
/** Normalize a typed traversal result (single | array | null) to an array. */
|
|
19
23
|
export declare function asArray<T>(result: T | readonly T[] | null): T[];
|
|
20
24
|
//# sourceMappingURL=view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/application/view.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/application/view.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAClF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,MAAM,MAAM,WAAW,GAAG,OAAO,MAAM,CAAA;AAEvC,gDAAgD;AAChD,MAAM,WAAW,SAAS;IACxB,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAA;IACnC,+EAA+E;IAC/E,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,EACxD,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,IAAI,GACT,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,IAAI,CAAA;CACxD;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAWrE;AAED,8EAA8E;AAC9E,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,CAG/D"}
|
package/dist/application/view.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { schema } from '@astrale-domains/shell-schema';
|
|
2
2
|
export function createShellDomainView(kernel) {
|
|
3
3
|
let bound = null;
|
|
4
|
-
const
|
|
4
|
+
const get = () => (bound ??= kernel.withSchema(schema));
|
|
5
5
|
return {
|
|
6
|
-
|
|
6
|
+
get,
|
|
7
7
|
bindAs(type, node) {
|
|
8
|
-
const v =
|
|
8
|
+
const v = get();
|
|
9
9
|
return v.bindAny(node).is(type) ? v.bind(type, node) : null;
|
|
10
10
|
},
|
|
11
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MessageOf, MessageType, ShellMessage } from '../message/message';
|
|
2
|
-
import type { MessageObserver } from './observer';
|
|
3
|
-
import type { Transport } from './transport';
|
|
1
|
+
import type { MessageOf, MessageType, ShellMessage } from '../message/message.js';
|
|
2
|
+
import type { MessageObserver } from './observer.js';
|
|
3
|
+
import type { Transport } from './transport.js';
|
|
4
4
|
/** Multiplexed channels down to child windows, keyed by windowId. */
|
|
5
5
|
export interface ChildrenChannel {
|
|
6
6
|
send(windowId: string, message: ShellMessage): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/channel/children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/channel/children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACnD,EAAE,CAAC,CAAC,SAAS,WAAW,EACtB,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,GACzD,MAAM,IAAI,CAAA;IACb,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CACzD;AAED,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAChE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;IACpD,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,eAAe,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;CACrE,CAAA;AAID,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,yBAAyB,CAmF9F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageHandler, MessageOf, MessageType, ShellMessage } from '../message/message';
|
|
1
|
+
import type { MessageHandler, MessageOf, MessageType, ShellMessage } from '../message/message.js';
|
|
2
2
|
/** Per-message-type listener registry — the fan-out primitive channels share. */
|
|
3
3
|
export interface MessageListeners {
|
|
4
4
|
on<T extends MessageType>(type: T, handler: MessageHandler<MessageOf<T>>): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../src/channel/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../src/channel/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEjG,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAA;IACrF,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;CACtC;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CA2BzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-port.d.ts","sourceRoot":"","sources":["../../src/channel/message-port.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"message-port.d.ts","sourceRoot":"","sources":["../../src/channel/message-port.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAyCxF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShellMessage } from '../message/message';
|
|
1
|
+
import type { ShellMessage } from '../message/message.js';
|
|
2
2
|
export type MessageDirection = 'inbound' | 'outbound';
|
|
3
3
|
export type ObserverHandler = (message: ShellMessage, direction: MessageDirection) => void;
|
|
4
4
|
/** Tap on every message crossing this shell, in both directions (`shell.onMessage`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../src/channel/observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../src/channel/observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,KAAK,IAAI,CAAA;AAE1F,wFAAwF;AACxF,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IAChE,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,IAAI,CAAA;CAChD;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CAqBvD"}
|
package/dist/channel/parent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MessageHandler, MessageOf, MessageType, ShellMessage } from '../message/message';
|
|
2
|
-
import type { MessageObserver } from './observer';
|
|
3
|
-
import type { Transport } from './transport';
|
|
1
|
+
import type { MessageHandler, MessageOf, MessageType, ShellMessage } from '../message/message.js';
|
|
2
|
+
import type { MessageObserver } from './observer.js';
|
|
3
|
+
import type { Transport } from './transport.js';
|
|
4
4
|
/** The child's single channel up to its parent shell. */
|
|
5
5
|
export interface ParentChannel {
|
|
6
6
|
send(message: ShellMessage): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../src/channel/parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../src/channel/parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAI/C,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACjC,EAAE,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAA;CACtF;AAED,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAA;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,GAAG,uBAAuB,CAqBxF"}
|
package/dist/channel/parent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/channel/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/channel/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACjC,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI,CAAA;IACzD,KAAK,IAAI,IAAI,CAAA;CACd"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
export type { IntentRegistry, ViewRef, PayloadOf, ReplyOf, IntentEnvelope, IntentMessage, } from './message/intent';
|
|
2
|
-
export type { CtrlRegistry, CtrlMessage } from './message/ctrl';
|
|
3
|
-
export type { ErrorCode, ErrorMessage } from './message/error';
|
|
4
|
-
export type { ShellMessage, MessageHandler } from './message/message';
|
|
5
|
-
export { INIT_REQUEST_TYPE, INIT_RESPONSE_TYPE, isInitRequest, isInitResponse, } from './message/init';
|
|
6
|
-
export type { InitRequestMessage, InitResponseMessage } from './message/init';
|
|
7
|
-
export type { KernelClient } from './kernel/client';
|
|
8
|
-
export { createKernelClientAdapter } from './kernel/session';
|
|
9
|
-
export type { KernelClientAdapter, CreateKernelClientAdapterOpts } from './kernel/session';
|
|
10
|
-
export type { DelegationScope, DelegationToken, TokenState } from './kernel/delegation/token';
|
|
11
|
-
export { stateOf, isExpired } from './kernel/delegation/token';
|
|
12
|
-
export { createTokenRefresher } from './kernel/delegation/refresh';
|
|
13
|
-
export type { TokenRefreshConfig, TokenRefresher } from './kernel/delegation/refresh';
|
|
14
|
-
export type { Transport } from './channel/transport';
|
|
15
|
-
export { createMessagePortTransport } from './channel/message-port';
|
|
16
|
-
export type { MessagePortTransportConfig } from './channel/message-port';
|
|
17
|
-
export type { ParentChannel } from './channel/parent';
|
|
18
|
-
export type { ChildrenChannel } from './channel/children';
|
|
19
|
-
export type { MessageDirection, ObserverHandler } from './channel/observer';
|
|
20
|
-
export type { Window, WindowState } from './window/window';
|
|
21
|
-
export type { WindowConfig, WindowCapabilities, SandboxProfile } from './window/capabilities';
|
|
22
|
-
export { transition as lifecycleTransition } from './window/lifecycle/transition';
|
|
23
|
-
export type { LifecycleEvent, TransitionResult } from './window/lifecycle/transition';
|
|
24
|
-
export type { ShellAdapter, WindowHandle } from './window/embed/adapter';
|
|
25
|
-
export { createIframeShellAdapter } from './window/embed/iframe';
|
|
26
|
-
export type { IframeShellAdapterConfig } from './window/embed/iframe';
|
|
27
|
-
export type { MountParams, MountCredential, MountedWindow, CloseResult, } from './window/mount/params';
|
|
28
|
-
export { runParentHandshake } from './window/mount/handshake';
|
|
29
|
-
export type { HandshakeParams, HandshakeError, HandshakeResult } from './window/mount/handshake';
|
|
30
|
-
export { createIntentPipeline } from './intent/pipeline';
|
|
31
|
-
export type { IntentMiddleware, IntentPipeline } from './intent/pipeline';
|
|
32
|
-
export type { IntentDecision, IntentOrigin, IntentPolicy, IntentContext } from './intent/policy';
|
|
33
|
-
export { createIntentRouter } from './intent/router';
|
|
34
|
-
export type { IntentRouter, IntentRouterController, IntentRouterConfig, LocalIntentHandler, } from './intent/router';
|
|
35
|
-
export { requestIntent, replyToIntent } from './intent/request';
|
|
36
|
-
export { loggingMiddleware } from './intent/middleware/logging';
|
|
37
|
-
export type { LoggingConfig, LoggingEntry, LoggingSink } from './intent/middleware/logging';
|
|
38
|
-
export { capabilitiesMiddleware } from './intent/middleware/capabilities';
|
|
39
|
-
export type { CapabilitiesConfig, CapabilityLookup, CapabilityViolation, } from './intent/middleware/capabilities';
|
|
40
|
-
export { rateLimitMiddleware } from './intent/middleware/rate-limit';
|
|
41
|
-
export type { RateLimitConfig, RateLimitViolation } from './intent/middleware/rate-limit';
|
|
42
|
-
export { createOsNamespaces } from './application/namespaces';
|
|
43
|
-
export type { OsNamespaces, CreateOsNamespacesDeps } from './application/namespaces';
|
|
44
|
-
export type { UserNamespace, UserNode, RoleNode } from './application/user';
|
|
45
|
-
export type { SpacesNamespace, SpaceNode } from './application/spaces';
|
|
46
|
-
export type { AppsNamespace, ApplicationNode } from './application/apps';
|
|
47
|
-
export { openAppSession } from './application/session/open';
|
|
48
|
-
export type { OpenAppSessionDeps } from './application/session/open';
|
|
49
|
-
export { AppSessionRefreshError } from './application/session/session';
|
|
50
|
-
export type { AppSession, AppView, RefreshStep } from './application/session/session';
|
|
51
|
-
export { createShell } from './shell/create';
|
|
52
|
-
export type { Shell } from './shell/shell';
|
|
53
|
-
export type { ShellConfig, StandaloneConfig, SandboxedConfig } from './shell/config';
|
|
54
|
-
export { requestAccess } from './shell/access';
|
|
55
|
-
export { performChildInit } from './shell/sandboxed/boot';
|
|
56
|
-
export type { ChildInitParams, ChildInitResult } from './shell/sandboxed/boot';
|
|
1
|
+
export type { IntentRegistry, ViewRef, PayloadOf, ReplyOf, IntentEnvelope, IntentMessage, } from './message/intent.js';
|
|
2
|
+
export type { CtrlRegistry, CtrlMessage } from './message/ctrl.js';
|
|
3
|
+
export type { ErrorCode, ErrorMessage } from './message/error.js';
|
|
4
|
+
export type { ShellMessage, MessageHandler } from './message/message.js';
|
|
5
|
+
export { INIT_REQUEST_TYPE, INIT_RESPONSE_TYPE, isInitRequest, isInitResponse, } from './message/init.js';
|
|
6
|
+
export type { InitRequestMessage, InitResponseMessage } from './message/init.js';
|
|
7
|
+
export type { KernelClient } from './kernel/client.js';
|
|
8
|
+
export { createKernelClientAdapter } from './kernel/session.js';
|
|
9
|
+
export type { KernelClientAdapter, CreateKernelClientAdapterOpts } from './kernel/session.js';
|
|
10
|
+
export type { DelegationScope, DelegationToken, TokenState } from './kernel/delegation/token.js';
|
|
11
|
+
export { stateOf, isExpired } from './kernel/delegation/token.js';
|
|
12
|
+
export { createTokenRefresher } from './kernel/delegation/refresh.js';
|
|
13
|
+
export type { TokenRefreshConfig, TokenRefresher } from './kernel/delegation/refresh.js';
|
|
14
|
+
export type { Transport } from './channel/transport.js';
|
|
15
|
+
export { createMessagePortTransport } from './channel/message-port.js';
|
|
16
|
+
export type { MessagePortTransportConfig } from './channel/message-port.js';
|
|
17
|
+
export type { ParentChannel } from './channel/parent.js';
|
|
18
|
+
export type { ChildrenChannel } from './channel/children.js';
|
|
19
|
+
export type { MessageDirection, ObserverHandler } from './channel/observer.js';
|
|
20
|
+
export type { Window, WindowState } from './window/window.js';
|
|
21
|
+
export type { WindowConfig, WindowCapabilities, SandboxProfile } from './window/capabilities.js';
|
|
22
|
+
export { transition as lifecycleTransition } from './window/lifecycle/transition.js';
|
|
23
|
+
export type { LifecycleEvent, TransitionResult } from './window/lifecycle/transition.js';
|
|
24
|
+
export type { ShellAdapter, WindowHandle } from './window/embed/adapter.js';
|
|
25
|
+
export { createIframeShellAdapter } from './window/embed/iframe.js';
|
|
26
|
+
export type { IframeShellAdapterConfig } from './window/embed/iframe.js';
|
|
27
|
+
export type { MountParams, MountCredential, MountedWindow, CloseResult, } from './window/mount/params.js';
|
|
28
|
+
export { runParentHandshake } from './window/mount/handshake.js';
|
|
29
|
+
export type { HandshakeParams, HandshakeError, HandshakeResult } from './window/mount/handshake.js';
|
|
30
|
+
export { createIntentPipeline } from './intent/pipeline.js';
|
|
31
|
+
export type { IntentMiddleware, IntentPipeline } from './intent/pipeline.js';
|
|
32
|
+
export type { IntentDecision, IntentOrigin, IntentPolicy, IntentContext } from './intent/policy.js';
|
|
33
|
+
export { createIntentRouter } from './intent/router.js';
|
|
34
|
+
export type { IntentRouter, IntentRouterController, IntentRouterConfig, LocalIntentHandler, } from './intent/router.js';
|
|
35
|
+
export { requestIntent, replyToIntent } from './intent/request.js';
|
|
36
|
+
export { loggingMiddleware } from './intent/middleware/logging.js';
|
|
37
|
+
export type { LoggingConfig, LoggingEntry, LoggingSink } from './intent/middleware/logging.js';
|
|
38
|
+
export { capabilitiesMiddleware } from './intent/middleware/capabilities.js';
|
|
39
|
+
export type { CapabilitiesConfig, CapabilityLookup, CapabilityViolation, } from './intent/middleware/capabilities.js';
|
|
40
|
+
export { rateLimitMiddleware } from './intent/middleware/rate-limit.js';
|
|
41
|
+
export type { RateLimitConfig, RateLimitViolation } from './intent/middleware/rate-limit.js';
|
|
42
|
+
export { createOsNamespaces } from './application/namespaces.js';
|
|
43
|
+
export type { OsNamespaces, CreateOsNamespacesDeps } from './application/namespaces.js';
|
|
44
|
+
export type { UserNamespace, UserNode, RoleNode } from './application/user.js';
|
|
45
|
+
export type { SpacesNamespace, SpaceNode } from './application/spaces.js';
|
|
46
|
+
export type { AppsNamespace, ApplicationNode } from './application/apps.js';
|
|
47
|
+
export { openAppSession } from './application/session/open.js';
|
|
48
|
+
export type { OpenAppSessionDeps } from './application/session/open.js';
|
|
49
|
+
export { AppSessionRefreshError } from './application/session/session.js';
|
|
50
|
+
export type { AppSession, AppView, RefreshStep } from './application/session/session.js';
|
|
51
|
+
export { createShell } from './shell/create.js';
|
|
52
|
+
export type { Shell } from './shell/shell.js';
|
|
53
|
+
export type { ShellConfig, StandaloneConfig, SandboxedConfig } from './shell/config.js';
|
|
54
|
+
export { requestAccess } from './shell/access.js';
|
|
55
|
+
export { performChildInit } from './shell/sandboxed/boot.js';
|
|
56
|
+
export type { ChildInitParams, ChildInitResult } from './shell/sandboxed/boot.js';
|
|
57
57
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,cAAc,EACd,OAAO,EACP,SAAS,EACT,OAAO,EACP,cAAc,EACd,aAAa,GACd,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|