@shellui/core 0.7.0 → 0.8.1
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/LICENSE +21 -0
- package/README.md +3 -1
- package/package.json +2 -2
- package/schemas/shellui.config.schema.json +45 -2
- package/src/app.tsx +2 -0
- package/src/features/auth/AuthProvider.tsx +212 -97
- package/src/features/auth/appBackend/configSchema.spec.ts +1 -0
- package/src/features/auth/appBackend/frameAuth.ts +5 -0
- package/src/features/auth/backends/shellui.spec.ts +110 -0
- package/src/features/auth/backends/shellui.ts +47 -20
- package/src/features/auth/backends/types.ts +5 -0
- package/src/features/auth/hooks/useAuth.tsx +6 -1
- package/src/features/auth/types.ts +5 -0
- package/src/features/auth/utils/bffAuthClient.spec.ts +313 -0
- package/src/features/auth/utils/bffAuthClient.ts +171 -49
- package/src/features/auth/utils/buildSessionFromParams.ts +5 -2
- package/src/features/auth/utils/buildSessionFromTokenPayload.spec.ts +12 -0
- package/src/features/auth/utils/buildSessionFromTokenPayload.ts +3 -1
- package/src/features/auth/utils/canRestoreStoredSession.spec.ts +140 -4
- package/src/features/auth/utils/canRestoreStoredSession.ts +47 -0
- package/src/features/auth/utils/cliCallback.ts +5 -0
- package/src/features/auth/utils/identityBrowserLogout.spec.ts +185 -0
- package/src/features/auth/utils/identityBrowserLogout.ts +174 -0
- package/src/features/auth/utils/index.ts +21 -3
- package/src/features/auth/utils/isBffAuthEnabled.ts +10 -2
- package/src/features/auth/utils/normalizeAuthSettings.spec.ts +9 -0
- package/src/features/auth/utils/normalizeAuthSettings.ts +3 -1
- package/src/features/auth/utils/pkce.spec.ts +29 -1
- package/src/features/auth/utils/pkce.ts +106 -2
- package/src/features/config/types.ts +37 -5
- package/src/features/mcp/mcpActivityErrorCodeI18n.spec.ts +32 -0
- package/src/features/mcp/mcpActivityErrorCodeI18n.ts +30 -0
- package/src/features/mcp/mcpAgentActivityMerge.spec.ts +91 -0
- package/src/features/mcp/mcpAgentActivityMerge.ts +53 -0
- package/src/features/mcp/mcpAgentActivityPresentation.spec.ts +129 -0
- package/src/features/mcp/mcpAgentActivityPresentation.ts +201 -0
- package/src/features/mcp/mcpAgentsConnect.spec.ts +215 -0
- package/src/features/mcp/mcpAgentsConnect.ts +189 -0
- package/src/features/mcp/mcpToolActivityRegistry.spec.ts +9 -0
- package/src/features/mcp/mcpToolActivityRegistry.ts +20 -0
- package/src/features/mcp/mcpToolApprovalsApi.spec.ts +113 -0
- package/src/features/mcp/mcpToolApprovalsApi.ts +162 -0
- package/src/features/mcp/personalAgentsApi.spec.ts +661 -0
- package/src/features/mcp/personalAgentsApi.ts +697 -0
- package/src/features/settings/SettingsIcons.tsx +28 -0
- package/src/features/settings/SettingsRoutes.tsx +8 -0
- package/src/features/settings/SettingsView.tsx +90 -26
- package/src/features/settings/components/McpAgentActivitySection.spec.tsx +255 -0
- package/src/features/settings/components/McpAgentActivitySection.tsx +481 -0
- package/src/features/settings/components/McpAgents.spec.tsx +336 -0
- package/src/features/settings/components/McpAgents.tsx +654 -0
- package/src/features/settings/components/McpPendingApprovals.spec.tsx +201 -0
- package/src/features/settings/components/McpPendingApprovals.tsx +168 -0
- package/src/features/settings/components/McpPersonalStatusPrefetch.tsx +21 -0
- package/src/features/settings/hooks/useMcpPendingToolApprovals.ts +69 -0
- package/src/features/settings/hooks/useMcpPersonalStatus.ts +83 -0
- package/src/features/settings/utils/buildSettingsForPropagation.spec.ts +44 -1
- package/src/features/settings/utils/buildSettingsForPropagation.ts +30 -1
- package/src/features/settings/utils/isMcpAgentsSettingsEligible.spec.ts +25 -0
- package/src/features/settings/utils/isMcpAgentsSettingsEligible.ts +14 -0
- package/src/features/settings/utils/loadMcpPersonalStatus.spec.ts +76 -0
- package/src/features/settings/utils/loadMcpPersonalStatus.ts +84 -0
- package/src/features/settings/utils/mcpPersonalStatusCache.spec.ts +77 -0
- package/src/features/settings/utils/mcpPersonalStatusCache.ts +95 -0
- package/src/features/settings/utils/shouldShowMcpAgentsSettings.spec.ts +66 -0
- package/src/features/settings/utils/shouldShowMcpAgentsSettings.ts +16 -0
- package/src/features/storage/StorageBridge.paths.spec.ts +286 -0
- package/src/features/storage/StorageBridge.tsx +25 -5
- package/src/features/storage/resolveStorageBridgeTarget.spec.ts +51 -0
- package/src/features/storage/resolveStorageBridgeTarget.ts +24 -0
- package/src/i18n/translations/en/settings.json +201 -0
- package/src/i18n/translations/fr/settings.json +201 -0
- package/src/index.ts +1 -0
- package/src/service-worker/sw.ts +4 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shellui
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ React runtime for Shellui, the open-source app shell: navigation, layouts, light
|
|
|
6
6
|
npm install @shellui/core
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Shellui **0.
|
|
9
|
+
Shellui **0.8.1** is the current stable release: `npm install @shellui/core@0.8.1`.
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import type { ShellUIConfig } from '@shellui/core';
|
|
@@ -14,6 +14,8 @@ import type { ShellUIConfig } from '@shellui/core';
|
|
|
14
14
|
|
|
15
15
|
Docs: [Core](https://docs.shellui.com/core), [CLI](https://docs.shellui.com/cli).
|
|
16
16
|
|
|
17
|
+
In **Settings → MCP / AI agents**, Shellui shows a global MCP URL only when identity returns the full dashboard endpoint (`…/mcp`). Recent tool activity lists classified outcomes and identity error codes only; it never prints raw provider error bodies.
|
|
18
|
+
|
|
17
19
|
## License
|
|
18
20
|
|
|
19
21
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shellui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "React runtime for Shellui, the open-source app shell. Renders navigation, layouts, themes with light and dark modes, sign-in and identity, and hosts your apps as micro frontends in one interface. MIT licensed.",
|
|
5
5
|
"homepage": "https://shellui.com",
|
|
6
6
|
"repository": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"workbox-routing": "^7.4.0",
|
|
91
91
|
"workbox-strategies": "^7.4.0",
|
|
92
92
|
"workbox-window": "^7.4.0",
|
|
93
|
-
"@shellui/sdk": "0.
|
|
93
|
+
"@shellui/sdk": "0.8.1"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -77,10 +77,18 @@
|
|
|
77
77
|
"$ref": "#/definitions/HostingConfig",
|
|
78
78
|
"description": "Hosting-service connection. Propagated to iframes via SDK settings. Enables `shellui deploy` when `url` is set."
|
|
79
79
|
},
|
|
80
|
+
"saas": {
|
|
81
|
+
"$ref": "#/definitions/SaasConfig",
|
|
82
|
+
"description": "Optional SaaS dashboard API base URL for CLI commands such as `shellui projects`. The shell runtime ignores this key today."
|
|
83
|
+
},
|
|
80
84
|
"email": {
|
|
81
85
|
"$ref": "#/definitions/EmailConfig",
|
|
82
86
|
"description": "Email-service connection. Propagated to iframes via SDK settings. Without `url`, the shell sends no email service (`null`). `showInAdmin: false` hides Admin → Email."
|
|
83
87
|
},
|
|
88
|
+
"aiService": {
|
|
89
|
+
"$ref": "#/definitions/AiServiceConfig",
|
|
90
|
+
"description": "AI-service connection. Propagated to iframes via SDK settings. Without `url`, the shell sends no ai service (`null`). `showInAdmin: false` hides Admin → AI."
|
|
91
|
+
},
|
|
84
92
|
"theme": {
|
|
85
93
|
"$ref": "#/definitions/ThemeRef",
|
|
86
94
|
"description": "Single theme: built-in name, path to a theme JSON/folder, or inline theme object. When set without `themes`, only this theme is available in the selector."
|
|
@@ -275,6 +283,14 @@
|
|
|
275
283
|
"hosting": {
|
|
276
284
|
"$ref": "#/definitions/HostingConfig",
|
|
277
285
|
"description": "Hosting service for this app. Same fallback as `email`."
|
|
286
|
+
},
|
|
287
|
+
"saas": {
|
|
288
|
+
"$ref": "#/definitions/SaasConfig",
|
|
289
|
+
"description": "SaaS dashboard API for this app. Same fallback as `email`."
|
|
290
|
+
},
|
|
291
|
+
"aiService": {
|
|
292
|
+
"$ref": "#/definitions/AiServiceConfig",
|
|
293
|
+
"description": "AI service for this app. Same fallback as `email`."
|
|
278
294
|
}
|
|
279
295
|
},
|
|
280
296
|
"required": ["label", "path", "url"],
|
|
@@ -384,6 +400,21 @@
|
|
|
384
400
|
"additionalProperties": false,
|
|
385
401
|
"description": "Optional email-service wiring for Admin → Email and iframe apps. The shell never invents a URL: without `url`, apps get no email service."
|
|
386
402
|
},
|
|
403
|
+
"AiServiceConfig": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"url": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"description": "Base URL of ai-service. Required for apps to get AI. There is no built-in default. Local: `http://localhost:8006`."
|
|
409
|
+
},
|
|
410
|
+
"showInAdmin": {
|
|
411
|
+
"type": "boolean",
|
|
412
|
+
"description": "When false, hide Admin → AI. Default: true (shown) when `aiService` is set."
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"additionalProperties": false,
|
|
416
|
+
"description": "Optional ai-service wiring for Admin → AI and iframe apps. The shell never invents a URL: without `url`, apps get no ai service."
|
|
417
|
+
},
|
|
387
418
|
"StorageConfig": {
|
|
388
419
|
"type": "object",
|
|
389
420
|
"properties": {
|
|
@@ -432,6 +463,18 @@
|
|
|
432
463
|
"additionalProperties": false,
|
|
433
464
|
"description": "Optional hosting-service wiring for `shellui deploy` preview uploads. Preview sites expire after 7 days unless redeployed to the same slug."
|
|
434
465
|
},
|
|
466
|
+
"SaasConfig": {
|
|
467
|
+
"type": "object",
|
|
468
|
+
"properties": {
|
|
469
|
+
"url": {
|
|
470
|
+
"type": "string",
|
|
471
|
+
"description": "Base URL of the SaaS dashboard API (for example `http://localhost:8005`). Used by CLI commands such as `shellui projects`. Override with `SHELLUI_SAAS_URL` when unset."
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"required": ["url"],
|
|
475
|
+
"additionalProperties": false,
|
|
476
|
+
"description": "Optional SaaS API URL for CLI regional calls. The in-shell experience does not read this block yet."
|
|
477
|
+
},
|
|
435
478
|
"NavigationGroup": {
|
|
436
479
|
"type": "object",
|
|
437
480
|
"properties": {
|
|
@@ -999,7 +1042,7 @@
|
|
|
999
1042
|
},
|
|
1000
1043
|
"loginUrl": {
|
|
1001
1044
|
"type": "string",
|
|
1002
|
-
"description": "Public origin (or full URL) of this shell
|
|
1045
|
+
"description": "Public origin (or full URL) of this shell, where `/login` and OAuth `/login/callback` live. The shell allowlists this origin. It is not the iframe admin app (`adminUrl`). Example: `https://app.example.com` or `http://127.0.0.1:4000`."
|
|
1003
1046
|
},
|
|
1004
1047
|
"publishableKey": {
|
|
1005
1048
|
"type": "string",
|
|
@@ -1088,7 +1131,7 @@
|
|
|
1088
1131
|
"properties": {
|
|
1089
1132
|
"enabled": {
|
|
1090
1133
|
"type": "boolean",
|
|
1091
|
-
"description": "
|
|
1134
|
+
"description": "Shell-host refresh cookie (`shellui_refresh` on `/api/auth`). `false` turns the routes off. The page then calls identity itself and stores the refresh token in sessionStorage. `true`, or leaving this out, mounts `/api/auth/*` on `shellui start` and `serve:dist`. The page uses them only after `GET /api/auth/session` returns {\"ready\": true}. A static host without those routes keeps the sessionStorage refresh token."
|
|
1092
1135
|
},
|
|
1093
1136
|
"cookieName": {
|
|
1094
1137
|
"type": "string",
|
package/src/app.tsx
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import { useSettings } from './features/settings/hooks/useSettings';
|
|
31
31
|
import { DesktopChrome } from './features/layouts/chrome/DesktopChrome';
|
|
32
32
|
import { MessagingSecurityBootstrap } from './features/messaging/MessagingSecurityBootstrap';
|
|
33
|
+
import { McpPersonalStatusPrefetch } from './features/settings/components/McpPersonalStatusPrefetch';
|
|
33
34
|
|
|
34
35
|
const AppContent = () => {
|
|
35
36
|
const { config } = useConfig();
|
|
@@ -138,6 +139,7 @@ const App = () => {
|
|
|
138
139
|
<AppBackendSessionHost />
|
|
139
140
|
<StorageBridge />
|
|
140
141
|
<SettingsProvider>
|
|
142
|
+
<McpPersonalStatusPrefetch />
|
|
141
143
|
<ShellAiHost />
|
|
142
144
|
<ThemeProvider>
|
|
143
145
|
<I18nProvider>
|