sh3-core 0.4.1 → 0.4.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.
@@ -28,6 +28,12 @@ export interface AppManifest {
28
28
  * user customization.
29
29
  */
30
30
  layoutVersion: number;
31
+ /**
32
+ * When true, the app is only visible on the shell home screen in
33
+ * admin mode. Server-side routes may still enforce their own auth
34
+ * independently. Defaults to false (visible to everyone).
35
+ */
36
+ admin?: boolean;
31
37
  }
32
38
  /**
33
39
  * Context object passed to `App.activate`. Provides app-scoped state zones
@@ -13,6 +13,7 @@ export const diagnosticApp = {
13
13
  version: '0.1.0',
14
14
  requiredShards: ['diagnostic'],
15
15
  layoutVersion: 1,
16
+ admin: true,
16
17
  },
17
18
  initialLayout: {
18
19
  type: 'tabs',
@@ -7,6 +7,5 @@ export { HttpDocumentBackend } from './documents/http-backend';
7
7
  export { installPackage, uninstallPackage, listInstalledPackages, loadInstalledPackages, } from './registry/index';
8
8
  export type { InstalledPackage, InstallResult, PackageMeta } from './registry/types';
9
9
  export { initAuth, elevate, deescalate } from './auth/index';
10
- export { adminAppIds } from './host';
11
10
  export { createShell } from './createShell';
12
11
  export type { ShellConfig } from './createShell';
@@ -12,6 +12,5 @@ export { HttpDocumentBackend } from './documents/http-backend';
12
12
  export { installPackage, uninstallPackage, listInstalledPackages, loadInstalledPackages, } from './registry/index';
13
13
  // Admin mode (host-only — elevate/deescalate drive the shell UI, initAuth runs at boot).
14
14
  export { initAuth, elevate, deescalate } from './auth/index';
15
- export { adminAppIds } from './host';
16
15
  // Shell boot factory.
17
16
  export { createShell } from './createShell';
package/dist/host.d.ts CHANGED
@@ -14,9 +14,4 @@ export interface BootstrapConfig {
14
14
  excludeApps?: string[];
15
15
  }
16
16
  export declare function bootstrap(config?: BootstrapConfig): Promise<void>;
17
- /**
18
- * Set of app IDs that require admin mode. Framework-internal — used by
19
- * the shell home to gate visibility. Not part of the app contract.
20
- */
21
- export declare const adminAppIds: ReadonlySet<string>;
22
17
  export { installPackage, listInstalledPackages } from './registry/installer';
package/dist/host.js CHANGED
@@ -77,9 +77,4 @@ export async function bootstrap(config) {
77
77
  await launchApp(lastId);
78
78
  }
79
79
  }
80
- /**
81
- * Set of app IDs that require admin mode. Framework-internal — used by
82
- * the shell home to gate visibility. Not part of the app contract.
83
- */
84
- export const adminAppIds = new Set(['sh3-store-app', 'diagnostic-app']);
85
80
  export { installPackage, listInstalledPackages } from './registry/installer';
@@ -8,11 +8,10 @@
8
8
 
9
9
  import { listRegisteredApps, launchApp, isAdmin } from '../api';
10
10
  import { elevate, deescalate } from '../auth/index';
11
- import { adminAppIds } from '../host';
12
11
 
13
12
  const apps = $derived(listRegisteredApps());
14
- const userApps = $derived(apps.filter(m => !adminAppIds.has(m.id)));
15
- const adminApps = $derived(apps.filter(m => adminAppIds.has(m.id)));
13
+ const userApps = $derived(apps.filter(m => !m.admin));
14
+ const adminApps = $derived(apps.filter(m => m.admin));
16
15
  const elevated = $derived(isAdmin());
17
16
 
18
17
  let keyInput = $state('');
@@ -4,8 +4,7 @@
4
4
  * packages.
5
5
  *
6
6
  * Framework-shipped: registered in host.ts during bootstrap.
7
- * Admin-gated: the shell home checks adminAppIds to gate visibility;
8
- * the AppManifest itself carries no admin flag (ADR-011).
7
+ * Admin-gated via manifest flag (ADR-011).
9
8
  */
10
9
  import type { App } from '../apps/types';
11
10
  export declare const storeApp: App;
@@ -4,8 +4,7 @@
4
4
  * packages.
5
5
  *
6
6
  * Framework-shipped: registered in host.ts during bootstrap.
7
- * Admin-gated: the shell home checks adminAppIds to gate visibility;
8
- * the AppManifest itself carries no admin flag (ADR-011).
7
+ * Admin-gated via manifest flag (ADR-011).
9
8
  */
10
9
  export const storeApp = {
11
10
  manifest: {
@@ -14,6 +13,7 @@ export const storeApp = {
14
13
  version: '0.1.0',
15
14
  requiredShards: ['sh3-store'],
16
15
  layoutVersion: 1,
16
+ admin: true,
17
17
  },
18
18
  initialLayout: {
19
19
  type: 'tabs',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh3-core",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"