@lincyaw/aegis-ui 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.
- package/README.md +17 -0
- package/dist/agent/AegisAgentProvider.d.ts +35 -0
- package/dist/agent/AgentProvider.d.ts +13 -0
- package/dist/agent/AgentmChannelProvider.d.ts +43 -0
- package/dist/agent/AskOverlay.d.ts +3 -0
- package/dist/agent/AskPanel.d.ts +19 -0
- package/dist/agent/aegisAgentContext.d.ts +6 -0
- package/dist/agent/agentContext.d.ts +52 -0
- package/dist/agent/agentmChannelClient.d.ts +76 -0
- package/dist/agent/buildAskContext.d.ts +9 -0
- package/dist/agent/hooks.d.ts +24 -0
- package/dist/agent/index.d.ts +17 -0
- package/dist/agent/mcpToolCatalogue.d.ts +2 -0
- package/dist/agent/runtime.d.ts +65 -0
- package/dist/agent/types.d.ts +261 -0
- package/dist/agent/useAgent.d.ts +7 -0
- package/dist/auth/AuthProvider.d.ts +13 -0
- package/dist/auth/RequireAuth.d.ts +13 -0
- package/dist/auth/authContext.d.ts +33 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/useAuth.d.ts +7 -0
- package/dist/commands/CommandProvider.d.ts +12 -0
- package/dist/commands/commandContext.d.ts +57 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/shortcut.d.ts +9 -0
- package/dist/commands/useCommands.d.ts +6 -0
- package/dist/commands/useRegisterCommands.d.ts +7 -0
- package/dist/components/ui/AgentPanel.d.ts +23 -0
- package/dist/components/ui/AuthLayout.d.ts +11 -0
- package/dist/components/ui/Avatar.d.ts +26 -0
- package/dist/components/ui/BlastRadiusBar.d.ts +24 -0
- package/dist/components/ui/Breadcrumb.d.ts +29 -0
- package/dist/components/ui/BucketCard.d.ts +24 -0
- package/dist/components/ui/Button.d.ts +14 -0
- package/dist/components/ui/ChatComposer.d.ts +10 -0
- package/dist/components/ui/ChatMessage.d.ts +31 -0
- package/dist/components/ui/ChatMessageList.d.ts +23 -0
- package/dist/components/ui/ChatSessionList.d.ts +22 -0
- package/dist/components/ui/Chip.d.ts +22 -0
- package/dist/components/ui/CodeBlock.d.ts +21 -0
- package/dist/components/ui/CodeEditor.d.ts +42 -0
- package/dist/components/ui/CommandInvocationCard.d.ts +24 -0
- package/dist/components/ui/CommandPalette.d.ts +3 -0
- package/dist/components/ui/ControlListItem.d.ts +18 -0
- package/dist/components/ui/DangerZone.d.ts +9 -0
- package/dist/components/ui/DataList.d.ts +30 -0
- package/dist/components/ui/DataTable.d.ts +48 -0
- package/dist/components/ui/DiffViewer.d.ts +33 -0
- package/dist/components/ui/DropdownMenu.d.ts +20 -0
- package/dist/components/ui/EmptyState.d.ts +10 -0
- package/dist/components/ui/EnvironmentSwitcher.d.ts +29 -0
- package/dist/components/ui/ErrorState.d.ts +11 -0
- package/dist/components/ui/EventTable.d.ts +39 -0
- package/dist/components/ui/FileDropzone.d.ts +47 -0
- package/dist/components/ui/FilePreview.d.ts +34 -0
- package/dist/components/ui/FolderDropzone.d.ts +24 -0
- package/dist/components/ui/ForgotPasswordForm.d.ts +12 -0
- package/dist/components/ui/FormRow.d.ts +9 -0
- package/dist/components/ui/InboxPage.d.ts +18 -0
- package/dist/components/ui/KeyValueList.d.ts +27 -0
- package/dist/components/ui/LoginForm.d.ts +18 -0
- package/dist/components/ui/Markdown.d.ts +6 -0
- package/dist/components/ui/MetadataList.d.ts +15 -0
- package/dist/components/ui/MetricCard.d.ts +30 -0
- package/dist/components/ui/MetricLabel.d.ts +11 -0
- package/dist/components/ui/MonoValue.d.ts +22 -0
- package/dist/components/ui/NotificationBell.d.ts +12 -0
- package/dist/components/ui/ObjectBrowser.d.ts +40 -0
- package/dist/components/ui/ObjectInspector.d.ts +27 -0
- package/dist/components/ui/PageHeader.d.ts +9 -0
- package/dist/components/ui/PageSizeSelect.d.ts +11 -0
- package/dist/components/ui/Panel.d.ts +22 -0
- package/dist/components/ui/PanelTitle.d.ts +10 -0
- package/dist/components/ui/ParquetViewer.d.ts +30 -0
- package/dist/components/ui/PasswordField.d.ts +9 -0
- package/dist/components/ui/ProjectSelector.d.ts +17 -0
- package/dist/components/ui/QueryAutocomplete.d.ts +26 -0
- package/dist/components/ui/RegisterForm.d.ts +14 -0
- package/dist/components/ui/ResizableSidePanel.d.ts +21 -0
- package/dist/components/ui/SavedQueryBar.d.ts +16 -0
- package/dist/components/ui/SearchInput.d.ts +12 -0
- package/dist/components/ui/SectionDivider.d.ts +12 -0
- package/dist/components/ui/ServiceMap.d.ts +28 -0
- package/dist/components/ui/SettingsSection.d.ts +9 -0
- package/dist/components/ui/ShareLinkDialog.d.ts +25 -0
- package/dist/components/ui/Skeleton.d.ts +16 -0
- package/dist/components/ui/SparkLine.d.ts +27 -0
- package/dist/components/ui/StatBlock.d.ts +29 -0
- package/dist/components/ui/StatusDot.d.ts +8 -0
- package/dist/components/ui/Tabs.d.ts +18 -0
- package/dist/components/ui/Terminal.d.ts +25 -0
- package/dist/components/ui/TextField.d.ts +10 -0
- package/dist/components/ui/ThemeToggle.d.ts +13 -0
- package/dist/components/ui/TimeDisplay.d.ts +11 -0
- package/dist/components/ui/TimeRangePicker.d.ts +18 -0
- package/dist/components/ui/Timeline.d.ts +32 -0
- package/dist/components/ui/TimelineChart.d.ts +23 -0
- package/dist/components/ui/ToolCallCard.d.ts +24 -0
- package/dist/components/ui/Toolbar.d.ts +24 -0
- package/dist/components/ui/TraceTree.d.ts +35 -0
- package/dist/components/ui/TrajectoryStep.d.ts +28 -0
- package/dist/components/ui/TrajectoryTimeline.d.ts +22 -0
- package/dist/components/ui/UploadQueue.d.ts +13 -0
- package/dist/components/ui/index.d.ts +130 -0
- package/dist/components/ui/relativeTime.d.ts +5 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useResizable.d.ts +15 -0
- package/dist/hooks/useSavedQueries.d.ts +23 -0
- package/dist/index-6WZzHI2Z.cjs +1151 -0
- package/dist/index-6WZzHI2Z.cjs.map +1 -0
- package/dist/index-CZ_qegBG.js +6736 -0
- package/dist/index-CZ_qegBG.js.map +1 -0
- package/dist/index-DLXAAlfH.cjs +15 -0
- package/dist/index-DLXAAlfH.cjs.map +1 -0
- package/dist/index-DtgBxtmy.js +56284 -0
- package/dist/index-DtgBxtmy.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts/PageWrapper.d.ts +10 -0
- package/dist/layouts/shell/AegisShell.d.ts +11 -0
- package/dist/layouts/shell/AppSwitcher.d.ts +14 -0
- package/dist/layouts/shell/AuthRequiredCard.d.ts +16 -0
- package/dist/layouts/shell/BreadcrumbBar.d.ts +13 -0
- package/dist/layouts/shell/Sidebar.d.ts +11 -0
- package/dist/layouts/shell/TopHeader.d.ts +33 -0
- package/dist/layouts/shell/activeAppContext.d.ts +15 -0
- package/dist/layouts/shell/environments/EnvironmentContext.d.ts +12 -0
- package/dist/layouts/shell/environments/context.d.ts +6 -0
- package/dist/layouts/shell/environments/hooks.d.ts +8 -0
- package/dist/layouts/shell/environments/index.d.ts +4 -0
- package/dist/layouts/shell/environments/manifest.d.ts +26 -0
- package/dist/layouts/shell/environments/types.d.ts +55 -0
- package/dist/layouts/shell/index.d.ts +7 -0
- package/dist/layouts/shell/types.d.ts +173 -0
- package/dist/layouts/shell/useAppNavigate.d.ts +21 -0
- package/dist/lib/luceneQuery/compile.d.ts +29 -0
- package/dist/lib/luceneQuery/index.d.ts +4 -0
- package/dist/lib/luceneQuery/tokenizeAtCursor.d.ts +21 -0
- package/dist/lib/timeRange.d.ts +25 -0
- package/dist/notifications/NotificationProvider.d.ts +13 -0
- package/dist/notifications/index.d.ts +3 -0
- package/dist/notifications/notificationContext.d.ts +38 -0
- package/dist/notifications/useNotifications.d.ts +7 -0
- package/dist/style.css +1 -0
- package/dist/styles/fonts.d.ts +0 -0
- package/dist/theme/ThemeProvider.d.ts +14 -0
- package/dist/theme/antdTheme.d.ts +9 -0
- package/dist/theme/themeContext.d.ts +12 -0
- package/dist/theme/useTheme.d.ts +2 -0
- package/dist/workerBundle-D52AeOj1.js +76 -0
- package/dist/workerBundle-D52AeOj1.js.map +1 -0
- package/dist/workerBundle-FGNDqtbW.cjs +73 -0
- package/dist/workerBundle-FGNDqtbW.cjs.map +1 -0
- package/package.json +89 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-6WZzHI2Z.cjs");exports.AGENTM_WIRE_VERSION=e.WIRE_VERSION;exports.AegisAgentProvider=e.AegisAgentProvider;exports.AegisShell=e.AegisShell;exports.AgentPanel=e.AgentPanel;exports.AgentProvider=e.AgentProvider;exports.AgentmChannelClient=e.AgentmChannelClient;exports.AgentmChannelProvider=e.AgentmChannelProvider;exports.AskOverlay=e.AskOverlay;exports.AskPanel=e.AskPanel;exports.AuthLayout=e.AuthLayout;exports.AuthProvider=e.AuthProvider;exports.Avatar=e.Avatar;exports.BlastRadiusBar=e.BlastRadiusBar;exports.Breadcrumb=e.Breadcrumb;exports.BucketCard=e.BucketCard;exports.Button=e.Button;exports.ChatComposer=e.ChatComposer;exports.ChatMessage=e.ChatMessage;exports.ChatMessageList=e.ChatMessageList;exports.ChatSessionList=e.ChatSessionList;exports.Chip=e.Chip;exports.CodeBlock=e.CodeBlock;exports.CodeEditor=e.CodeEditor;exports.CommandInvocationCard=e.CommandInvocationCard;exports.CommandPalette=e.CommandPalette;exports.CommandProvider=e.CommandProvider;exports.ControlListItem=e.ControlListItem;exports.DangerZone=e.DangerZone;exports.DataList=e.DataList;exports.DataTable=e.DataTable;exports.DiffViewer=e.DiffViewer;exports.DropdownMenu=e.DropdownMenu;exports.ENVIRONMENT_CHANGED_EVENT=e.ENVIRONMENT_CHANGED_EVENT;exports.EmptyState=e.EmptyState;exports.EnvironmentSwitcher=e.EnvironmentSwitcher;exports.ErrorState=e.ErrorState;exports.EventTable=e.EventTable;exports.FileDropzone=e.FileDropzone;exports.FilePreview=e.FilePreview;exports.FolderDropzone=e.FolderDropzone;exports.ForgotPasswordForm=e.ForgotPasswordForm;exports.FormRow=e.FormRow;exports.InboxPage=e.InboxPage;exports.KeyValueList=e.KeyValueList;exports.LoginForm=e.LoginForm;exports.Markdown=e.Markdown;exports.MetadataList=e.MetadataList;exports.MetricCard=e.MetricCard;exports.MetricLabel=e.MetricLabel;exports.MonoValue=e.MonoValue;exports.NotificationBell=e.NotificationBell;exports.NotificationProvider=e.NotificationProvider;exports.ObjectBrowser=e.ObjectBrowser;exports.ObjectInspector=e.ObjectInspector;exports.PageHeader=e.PageHeader;exports.PageSizeSelect=e.PageSizeSelect;exports.PageWrapper=e.PageWrapper;exports.Panel=e.Panel;exports.PanelTitle=e.PanelTitle;exports.ParquetViewer=e.ParquetViewer;exports.PasswordField=e.PasswordField;exports.ProjectSelector=e.ProjectSelector;exports.QueryAutocomplete=e.QueryAutocomplete;exports.RELATIVE_TIME_PRESETS=e.RELATIVE_TIME_PRESETS;exports.RegisterForm=e.RegisterForm;exports.RequireAuth=e.RequireAuth;exports.ResizableSidePanel=e.ResizableSidePanel;exports.SavedQueryBar=e.SavedQueryBar;exports.SearchInput=e.SearchInput;exports.SectionDivider=e.SectionDivider;exports.ServiceMap=e.ServiceMap;exports.SettingsSection=e.SettingsSection;exports.ShareLinkDialog=e.ShareLinkDialog;exports.Skeleton=e.Skeleton;exports.SkeletonText=e.SkeletonText;exports.SparkLine=e.SparkLine;exports.StatBlock=e.StatBlock;exports.StatusDot=e.StatusDot;exports.Tabs=e.Tabs;exports.Terminal=e.Terminal;exports.TextField=e.TextField;exports.ThemeProvider=e.ThemeProvider;exports.ThemeToggle=e.ThemeToggle;exports.TimeDisplay=e.TimeDisplay;exports.TimeRangePicker=e.TimeRangePicker;exports.Timeline=e.Timeline;exports.TimelineChart=e.TimelineChart;exports.ToolCallCard=e.ToolCallCard;exports.Toolbar=e.Toolbar;exports.TraceTree=e.TraceTree;exports.TrajectoryStep=e.TrajectoryStep;exports.TrajectoryTimeline=e.TrajectoryTimeline;exports.UploadQueue=e.UploadQueue;exports.aegisTheme=e.aegisTheme;exports.buildAskContext=e.buildAskContext;exports.clearManifestCache=e.clearManifestCache;exports.compileLuceneToSql=e.compileLuceneToSql;exports.createAegisRuntime=e.createAegisRuntime;exports.fetchManifest=e.fetchManifest;exports.formatShortcut=e.formatShortcut;exports.getAegisTheme=e.getAegisTheme;exports.manifestUrl=e.manifestUrl;exports.parseRelativeTime=e.parseRelativeTime;exports.parseTimeRangeInput=e.parseTimeRangeInput;exports.replaceTokenAtCursor=e.replaceTokenAtCursor;exports.tokenizeAtCursor=e.tokenizeAtCursor;exports.useActiveApp=e.useActiveApp;exports.useAegisAction=e.useAegisAction;exports.useAegisSearchProvider=e.useAegisSearchProvider;exports.useAegisSurface=e.useAegisSurface;exports.useAgent=e.useAgent;exports.useAppHref=e.useAppHref;exports.useAppNavigate=e.useAppNavigate;exports.useAuth=e.useAuth;exports.useCommands=e.useCommands;exports.useCurrentEnvironment=e.useCurrentEnvironment;exports.useEnvironmentManifest=e.useEnvironmentManifest;exports.useNotifications=e.useNotifications;exports.useRegisterCommands=e.useRegisterCommands;exports.useResizable=e.useResizable;exports.useSavedQueries=e.useSavedQueries;exports.useTheme=e.useTheme;exports.validateManifest=e.validateManifest;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from './components/ui';
|
|
2
|
+
export { useResizable, useSavedQueries } from './hooks';
|
|
3
|
+
export type { SavedQuery, UseResizableOptions, UseResizableReturn, UseSavedQueriesOptions, UseSavedQueriesReturn, } from './hooks';
|
|
4
|
+
export { RELATIVE_TIME_PRESETS, parseRelativeTime, parseTimeRangeInput, } from './lib/timeRange';
|
|
5
|
+
export type { RelativeTimePreset, TimeRange } from './lib/timeRange';
|
|
6
|
+
export { compileLuceneToSql, replaceTokenAtCursor, tokenizeAtCursor, } from './lib/luceneQuery';
|
|
7
|
+
export type { CompileOptions, CompileResult, CursorToken, FieldMapping, } from './lib/luceneQuery';
|
|
8
|
+
export { PageWrapper } from './layouts/PageWrapper';
|
|
9
|
+
export type { PageWrapperProps } from './layouts/PageWrapper';
|
|
10
|
+
export { AegisShell, ENVIRONMENT_CHANGED_EVENT, clearManifestCache, fetchManifest, manifestUrl, useActiveApp, useAppHref, useAppNavigate, useCurrentEnvironment, useEnvironmentManifest, validateManifest, } from './layouts/shell';
|
|
11
|
+
export type { ActiveAppContextValue, AegisApp, AegisAppEnvironmentsConfig, AegisAppNavGroup, AegisAppNavItem, AegisBrand, AegisShellProps, AegisUser, AegisUserMenuItem, EnvironmentBadge, EnvironmentChangedEventDetail, EnvironmentDescriptor, EnvironmentManifest, EnvironmentManifestStatus, } from './layouts/shell';
|
|
12
|
+
export { aegisTheme, getAegisTheme } from './theme/antdTheme';
|
|
13
|
+
export { ThemeProvider } from './theme/ThemeProvider';
|
|
14
|
+
export type { ThemeProviderProps } from './theme/ThemeProvider';
|
|
15
|
+
export { useTheme } from './theme/useTheme';
|
|
16
|
+
export type { ThemeMode, ThemePreference } from './theme/themeContext';
|
|
17
|
+
export { AuthProvider, RequireAuth, useAuth } from './auth';
|
|
18
|
+
export type { AegisAuthUser, AuthContextValue, AuthStatus } from './auth';
|
|
19
|
+
export { NotificationProvider, useNotifications } from './notifications';
|
|
20
|
+
export type { AegisNotification, NotificationContextValue, } from './notifications';
|
|
21
|
+
export { CommandProvider, formatShortcut, useCommands, useRegisterCommands, } from './commands';
|
|
22
|
+
export type { Command, CommandContextValue } from './commands';
|
|
23
|
+
export { AgentmChannelClient, AgentmChannelProvider, AgentProvider, AGENTM_WIRE_VERSION, useAgent, } from './agent';
|
|
24
|
+
export type { AgentContextValue, AgentCommandInvocation, AgentmChannelClientOptions, AgentmConnectionStatus, AgentmEnvelope, AgentmEnvelopeKind, AgentMessage, AgentMessageRole, } from './agent';
|
|
25
|
+
export { AegisAgentProvider, AskOverlay, AskPanel, buildAskContext, createAegisRuntime, useAegisAction, useAegisSearchProvider, useAegisSurface, } from './agent';
|
|
26
|
+
export type { ActionContext, ActionPreview, ActionSource, AegisAction, AegisActionDescriptor, AegisError, AegisErrorCode, AegisEvent, AegisInspectResult, AegisRef, AegisRuntime, AegisSearchResult, AegisSnapshot, AskContext, AskMessage, AskOrigin, AskPanelProps, AskRequest, AskTrigger, DispatchResult, EntityProjection, EntityRef, FieldProjection, InvocationSource, ListActionsFilter, McpToolDefinition, RegisteredAction, RuntimeDeps, SearchOptions, SearchProvider, ShellSnapshot, SnapshotDiff, SurfaceKind, SurfaceSnapshot, UseAegisActionResult, UseAegisSurfaceOptions, UseAegisSurfaceResult, } from './agent';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { W as s, A as t, a as r, b as i, d as o, e as n, f as l, h as u, i as m, j as d, k as c, l as T, B as g, m as A, n as S, o as C, C as p, p as h, q as P, r as v, s as E, t as b, u as M, v as R, w as f, x as k, y as L, D, z as I, E as N, F as w, G as B, H as F, I as y, J as V, K as z, L as _, M as j, N as x, O, P as Q, Q as q, R as H, S as G, T as U, U as W, V as K, X as Z, Y as J, Z as X, _ as Y, $, a0 as aa, a1 as ea, a2 as sa, a3 as ta, a4 as ra, a5 as ia, a6 as oa, a7 as na, a8 as la, a9 as ua, aa as ma, ab as da, ac as ca, ad as Ta, ae as ga, af as Aa, ag as Sa, ah as Ca, ai as pa, aj as ha, ak as Pa, al as va, am as Ea, an as ba, ao as Ma, ap as Ra, aq as fa, ar as ka, as as La, at as Da, au as Ia, av as Na, aw as wa, ax as Ba, ay as Fa, az as ya, aA as Va, aB as za, aC as _a, aD as ja, aE as xa, aF as Oa, aG as Qa, aH as qa, aI as Ha, aJ as Ga, aK as Ua, aL as Wa, aM as Ka, aN as Za, aO as Ja, aP as Xa, aQ as Ya, aR as $a, aS as ae, aT as ee, aU as se, aV as te, aW as re, aX as ie, aY as oe, aZ as ne, a_ as le, a$ as ue, b0 as me, b1 as de, b2 as ce, b3 as Te, b4 as ge, b5 as Ae, b6 as Se } from "./index-DtgBxtmy.js";
|
|
2
|
+
export {
|
|
3
|
+
s as AGENTM_WIRE_VERSION,
|
|
4
|
+
t as AegisAgentProvider,
|
|
5
|
+
r as AegisShell,
|
|
6
|
+
i as AgentPanel,
|
|
7
|
+
o as AgentProvider,
|
|
8
|
+
n as AgentmChannelClient,
|
|
9
|
+
l as AgentmChannelProvider,
|
|
10
|
+
u as AskOverlay,
|
|
11
|
+
m as AskPanel,
|
|
12
|
+
d as AuthLayout,
|
|
13
|
+
c as AuthProvider,
|
|
14
|
+
T as Avatar,
|
|
15
|
+
g as BlastRadiusBar,
|
|
16
|
+
A as Breadcrumb,
|
|
17
|
+
S as BucketCard,
|
|
18
|
+
C as Button,
|
|
19
|
+
p as ChatComposer,
|
|
20
|
+
h as ChatMessage,
|
|
21
|
+
P as ChatMessageList,
|
|
22
|
+
v as ChatSessionList,
|
|
23
|
+
E as Chip,
|
|
24
|
+
b as CodeBlock,
|
|
25
|
+
M as CodeEditor,
|
|
26
|
+
R as CommandInvocationCard,
|
|
27
|
+
f as CommandPalette,
|
|
28
|
+
k as CommandProvider,
|
|
29
|
+
L as ControlListItem,
|
|
30
|
+
D as DangerZone,
|
|
31
|
+
I as DataList,
|
|
32
|
+
N as DataTable,
|
|
33
|
+
w as DiffViewer,
|
|
34
|
+
B as DropdownMenu,
|
|
35
|
+
F as ENVIRONMENT_CHANGED_EVENT,
|
|
36
|
+
y as EmptyState,
|
|
37
|
+
V as EnvironmentSwitcher,
|
|
38
|
+
z as ErrorState,
|
|
39
|
+
_ as EventTable,
|
|
40
|
+
j as FileDropzone,
|
|
41
|
+
x as FilePreview,
|
|
42
|
+
O as FolderDropzone,
|
|
43
|
+
Q as ForgotPasswordForm,
|
|
44
|
+
q as FormRow,
|
|
45
|
+
H as InboxPage,
|
|
46
|
+
G as KeyValueList,
|
|
47
|
+
U as LoginForm,
|
|
48
|
+
W as Markdown,
|
|
49
|
+
K as MetadataList,
|
|
50
|
+
Z as MetricCard,
|
|
51
|
+
J as MetricLabel,
|
|
52
|
+
X as MonoValue,
|
|
53
|
+
Y as NotificationBell,
|
|
54
|
+
$ as NotificationProvider,
|
|
55
|
+
aa as ObjectBrowser,
|
|
56
|
+
ea as ObjectInspector,
|
|
57
|
+
sa as PageHeader,
|
|
58
|
+
ta as PageSizeSelect,
|
|
59
|
+
ra as PageWrapper,
|
|
60
|
+
ia as Panel,
|
|
61
|
+
oa as PanelTitle,
|
|
62
|
+
na as ParquetViewer,
|
|
63
|
+
la as PasswordField,
|
|
64
|
+
ua as ProjectSelector,
|
|
65
|
+
ma as QueryAutocomplete,
|
|
66
|
+
da as RELATIVE_TIME_PRESETS,
|
|
67
|
+
ca as RegisterForm,
|
|
68
|
+
Ta as RequireAuth,
|
|
69
|
+
ga as ResizableSidePanel,
|
|
70
|
+
Aa as SavedQueryBar,
|
|
71
|
+
Sa as SearchInput,
|
|
72
|
+
Ca as SectionDivider,
|
|
73
|
+
pa as ServiceMap,
|
|
74
|
+
ha as SettingsSection,
|
|
75
|
+
Pa as ShareLinkDialog,
|
|
76
|
+
va as Skeleton,
|
|
77
|
+
Ea as SkeletonText,
|
|
78
|
+
ba as SparkLine,
|
|
79
|
+
Ma as StatBlock,
|
|
80
|
+
Ra as StatusDot,
|
|
81
|
+
fa as Tabs,
|
|
82
|
+
ka as Terminal,
|
|
83
|
+
La as TextField,
|
|
84
|
+
Da as ThemeProvider,
|
|
85
|
+
Ia as ThemeToggle,
|
|
86
|
+
Na as TimeDisplay,
|
|
87
|
+
wa as TimeRangePicker,
|
|
88
|
+
Ba as Timeline,
|
|
89
|
+
Fa as TimelineChart,
|
|
90
|
+
ya as ToolCallCard,
|
|
91
|
+
Va as Toolbar,
|
|
92
|
+
za as TraceTree,
|
|
93
|
+
_a as TrajectoryStep,
|
|
94
|
+
ja as TrajectoryTimeline,
|
|
95
|
+
xa as UploadQueue,
|
|
96
|
+
Oa as aegisTheme,
|
|
97
|
+
Qa as buildAskContext,
|
|
98
|
+
qa as clearManifestCache,
|
|
99
|
+
Ha as compileLuceneToSql,
|
|
100
|
+
Ga as createAegisRuntime,
|
|
101
|
+
Ua as fetchManifest,
|
|
102
|
+
Wa as formatShortcut,
|
|
103
|
+
Ka as getAegisTheme,
|
|
104
|
+
Za as manifestUrl,
|
|
105
|
+
Ja as parseRelativeTime,
|
|
106
|
+
Xa as parseTimeRangeInput,
|
|
107
|
+
Ya as replaceTokenAtCursor,
|
|
108
|
+
$a as tokenizeAtCursor,
|
|
109
|
+
ae as useActiveApp,
|
|
110
|
+
ee as useAegisAction,
|
|
111
|
+
se as useAegisSearchProvider,
|
|
112
|
+
te as useAegisSurface,
|
|
113
|
+
re as useAgent,
|
|
114
|
+
ie as useAppHref,
|
|
115
|
+
oe as useAppNavigate,
|
|
116
|
+
ne as useAuth,
|
|
117
|
+
le as useCommands,
|
|
118
|
+
ue as useCurrentEnvironment,
|
|
119
|
+
me as useEnvironmentManifest,
|
|
120
|
+
de as useNotifications,
|
|
121
|
+
ce as useRegisterCommands,
|
|
122
|
+
Te as useResizable,
|
|
123
|
+
ge as useSavedQueries,
|
|
124
|
+
Ae as useTheme,
|
|
125
|
+
Se as validateManifest
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface PageWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Page root container. Owns `max-width`, `margin`, `padding`, and the
|
|
7
|
+
* staggered fade-in animation. Sub-apps compose pages from this — they
|
|
8
|
+
* must never redefine these properties.
|
|
9
|
+
*/
|
|
10
|
+
export declare function PageWrapper({ children, className, ...rest }: PageWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AegisShellProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Top-level layout: top header, two-section sidebar, breadcrumb bar, and
|
|
5
|
+
* a routed content area composed from `apps`.
|
|
6
|
+
*
|
|
7
|
+
* Each app's `routes` is mounted under its `basePath`. The shell renders
|
|
8
|
+
* the chrome around every app — apps themselves only render page content
|
|
9
|
+
* inside a `<PageWrapper>` (the shell wraps the outlet automatically).
|
|
10
|
+
*/
|
|
11
|
+
export declare function AegisShell({ brand, apps, rootRoutes, fallbackPath, notFoundElement, user, userMenu, headerCenter, headerActions, inboxPath, onAppSwitch, }: AegisShellProps): ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AegisApp } from './types';
|
|
3
|
+
interface AppSwitcherProps {
|
|
4
|
+
apps: AegisApp[];
|
|
5
|
+
activeAppId?: string;
|
|
6
|
+
onAppSwitch?: (appId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Alibaba-Cloud-style app launcher. A 9-dot icon on the top-left anchors
|
|
10
|
+
* a popover grid of every registered app — clicking one navigates to its
|
|
11
|
+
* `basePath` and closes the popover.
|
|
12
|
+
*/
|
|
13
|
+
export declare function AppSwitcher({ apps, activeAppId, onAppSwitch, }: AppSwitcherProps): ReactElement;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AegisAuthUser } from '../../auth';
|
|
3
|
+
import { AegisApp } from './types';
|
|
4
|
+
interface AuthRequiredCardProps {
|
|
5
|
+
app: AegisApp;
|
|
6
|
+
status: 'loading' | 'authenticated' | 'unauthenticated';
|
|
7
|
+
user: AegisAuthUser | null;
|
|
8
|
+
onSignIn?: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Rendered in place of an app's content when the current user is not
|
|
12
|
+
* authorized to view it. Distinguishes between "needs login" and
|
|
13
|
+
* "logged in but missing role" so the message and call-to-action match.
|
|
14
|
+
*/
|
|
15
|
+
export declare function AuthRequiredCard({ app, status, user, onSignIn, }: AuthRequiredCardProps): ReactElement;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AegisApp } from './types';
|
|
3
|
+
interface BreadcrumbBarProps {
|
|
4
|
+
apps: AegisApp[];
|
|
5
|
+
activeApp: AegisApp | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Derives breadcrumbs from the active app + current URL by matching the
|
|
9
|
+
* URL against the app's declared sidebar nav. Pages that want a richer
|
|
10
|
+
* trail should render their own `<Breadcrumb>` and ignore this default.
|
|
11
|
+
*/
|
|
12
|
+
export declare function BreadcrumbBar({ apps, activeApp, }: BreadcrumbBarProps): ReactElement | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AegisApp } from './types';
|
|
3
|
+
interface SidebarProps {
|
|
4
|
+
activeApp: AegisApp | undefined;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Per-app inner nav. The global app list lives in the header's
|
|
8
|
+
* `AppSwitcher`, not here — sidebar only ever shows the current app.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Sidebar({ activeApp }: SidebarProps): ReactElement | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { AegisApp, AegisBrand, AegisUser } from './types';
|
|
3
|
+
interface TopHeaderProps {
|
|
4
|
+
brand: AegisBrand;
|
|
5
|
+
apps: AegisApp[];
|
|
6
|
+
activeAppId?: string;
|
|
7
|
+
onAppSwitch?: (appId: string) => void;
|
|
8
|
+
user?: AegisUser;
|
|
9
|
+
headerCenter?: ReactNode;
|
|
10
|
+
headerActions?: ReactNode;
|
|
11
|
+
/** When set, render a notification bell linking to this path. */
|
|
12
|
+
inboxPath?: string;
|
|
13
|
+
/** Fired by the mobile hamburger; the shell owns the open state. */
|
|
14
|
+
onMobileMenuToggle?: () => void;
|
|
15
|
+
/** Whether to render the mobile hamburger at all (only when sidebar exists). */
|
|
16
|
+
showMobileMenu?: boolean;
|
|
17
|
+
/** Whether to render the desktop sidebar collapse toggle. */
|
|
18
|
+
sidebarCollapsible?: boolean;
|
|
19
|
+
/** Current collapsed state — drives aria-pressed on the toggle. */
|
|
20
|
+
sidebarCollapsed?: boolean;
|
|
21
|
+
/** Fired by the desktop collapse button; the shell owns the state. */
|
|
22
|
+
onSidebarToggle?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Ref callback for the inline app-header slot. The active app's
|
|
25
|
+
* `header` is portalled into this node so it appears inside the shell
|
|
26
|
+
* header instead of below it.
|
|
27
|
+
*/
|
|
28
|
+
inlineSlotRef?: (node: HTMLDivElement | null) => void;
|
|
29
|
+
/** When true, hide the global `headerCenter` (an app header took it over). */
|
|
30
|
+
inlineSlotActive?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, }: TopHeaderProps): ReactElement;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slice of the active app exposed to its `header` and routes via
|
|
3
|
+
* Context. Lets app-scoped components build URLs from `basePath` instead
|
|
4
|
+
* of hardcoding it — so an app stays portable if its mount path changes.
|
|
5
|
+
*/
|
|
6
|
+
export interface ActiveAppContextValue {
|
|
7
|
+
id: string;
|
|
8
|
+
basePath: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ActiveAppContext: import('react').Context<ActiveAppContextValue | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Read the active app's identity from inside its `header`, `wrap`, or
|
|
13
|
+
* route subtree. Throws if used outside an `AegisShell`-mounted app.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useActiveApp(): ActiveAppContextValue;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { AegisApp } from '../types';
|
|
3
|
+
interface ProviderProps {
|
|
4
|
+
app: AegisApp | undefined;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Mounts environment-discovery state for the active app. Internal — the
|
|
9
|
+
* shell wires it; consumers read state via `useCurrentEnvironment()`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ActiveAppEnvironmentProvider({ app, children, }: ProviderProps): ReactElement;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EnvironmentDescriptor, EnvironmentManifestStatus } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Read the active app's current environment selection. Returns `null` when
|
|
4
|
+
* no app is active or the manifest is still loading without a fallback.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useCurrentEnvironment(): EnvironmentDescriptor | null;
|
|
7
|
+
/** Read the full status object — useful for the switcher itself. */
|
|
8
|
+
export declare function useEnvironmentManifest(): EnvironmentManifestStatus;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ActiveAppEnvironmentProvider } from './EnvironmentContext';
|
|
2
|
+
export { useCurrentEnvironment, useEnvironmentManifest } from './hooks';
|
|
3
|
+
export { clearManifestCache, fetchManifest, manifestUrl, validateManifest, } from './manifest';
|
|
4
|
+
export { ENVIRONMENT_CHANGED_EVENT, type AegisAppEnvironmentsConfig, type EnvironmentBadge, type EnvironmentChangedEventDetail, type EnvironmentDescriptor, type EnvironmentManifest, type EnvironmentManifestStatus, } from './types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EnvironmentManifest } from './types';
|
|
2
|
+
export interface ManifestFetchOptions {
|
|
3
|
+
apiBaseUrl: string;
|
|
4
|
+
discoveryPath: string;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
/** Skip cache + force a network round-trip (revalidates with ETag if known). */
|
|
7
|
+
force?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Compose the URL the way the spec describes. Tolerates trailing slashes. */
|
|
10
|
+
export declare function manifestUrl(apiBaseUrl: string, discoveryPath: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Validate manifest shape. Returns the parsed manifest on success, `null`
|
|
13
|
+
* when the payload is malformed. Does not throw — schema mismatch is a
|
|
14
|
+
* silent unsupported state per the design.
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateManifest(input: unknown): EnvironmentManifest | null;
|
|
17
|
+
/**
|
|
18
|
+
* Fetch + cache a manifest. Resolves to the manifest on 2xx with a valid
|
|
19
|
+
* payload, `null` on 404 / network error / schema mismatch.
|
|
20
|
+
*
|
|
21
|
+
* Errors are intentionally swallowed — the design makes manifest absence
|
|
22
|
+
* a normal mode, not a failure.
|
|
23
|
+
*/
|
|
24
|
+
export declare function fetchManifest(opts: ManifestFetchOptions): Promise<EnvironmentManifest | null>;
|
|
25
|
+
/** Test helper — exported so unit tests / specimens can reset state. */
|
|
26
|
+
export declare function clearManifestCache(): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend-declared environment discovery — public types.
|
|
3
|
+
*
|
|
4
|
+
* Each AegisApp may opt-in to environment discovery by setting `apiBaseUrl`
|
|
5
|
+
* + (optionally) `environments`. The shell fetches a manifest from
|
|
6
|
+
* `<apiBaseUrl><discoveryPath>` (default `/.well-known/aegis-environments.json`)
|
|
7
|
+
* and surfaces the env list through the `<EnvironmentSwitcher>` mounted in
|
|
8
|
+
* the top header. Apps subscribe to the `app.environmentChanged` runtime
|
|
9
|
+
* event (or read `useCurrentEnvironment()`) to react to switches.
|
|
10
|
+
*/
|
|
11
|
+
export type EnvironmentBadge = 'default' | 'info' | 'warning' | 'danger';
|
|
12
|
+
export interface EnvironmentDescriptor {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
badge?: EnvironmentBadge;
|
|
17
|
+
}
|
|
18
|
+
export interface EnvironmentManifest {
|
|
19
|
+
default: string;
|
|
20
|
+
environments: EnvironmentDescriptor[];
|
|
21
|
+
}
|
|
22
|
+
export interface AegisAppEnvironmentsConfig {
|
|
23
|
+
/** Path appended to `apiBaseUrl`. Default `/.well-known/aegis-environments.json`. */
|
|
24
|
+
discoveryPath?: string;
|
|
25
|
+
/**
|
|
26
|
+
* What to do when the manifest is missing / 404 / schema invalid.
|
|
27
|
+
* - `production` (default) — show a single synthetic prod env, hide the switcher.
|
|
28
|
+
* - `hidden` — render nothing.
|
|
29
|
+
*/
|
|
30
|
+
fallback?: 'production' | 'hidden';
|
|
31
|
+
/** localStorage key. Default `aegis.env.${app.id}`. */
|
|
32
|
+
storageKey?: string;
|
|
33
|
+
}
|
|
34
|
+
export type EnvironmentManifestStatus = {
|
|
35
|
+
status: 'idle';
|
|
36
|
+
} | {
|
|
37
|
+
status: 'loading';
|
|
38
|
+
} | {
|
|
39
|
+
status: 'ready';
|
|
40
|
+
manifest: EnvironmentManifest;
|
|
41
|
+
currentEnvId: string;
|
|
42
|
+
currentEnv: EnvironmentDescriptor;
|
|
43
|
+
setCurrentEnv: (id: string) => void;
|
|
44
|
+
} | {
|
|
45
|
+
status: 'unsupported';
|
|
46
|
+
currentEnv: EnvironmentDescriptor;
|
|
47
|
+
};
|
|
48
|
+
export interface EnvironmentChangedEventDetail {
|
|
49
|
+
appId: string;
|
|
50
|
+
fromEnvId: string | null;
|
|
51
|
+
toEnvId: string;
|
|
52
|
+
env: EnvironmentDescriptor;
|
|
53
|
+
}
|
|
54
|
+
/** Window-level event name for env switch broadcasts. */
|
|
55
|
+
export declare const ENVIRONMENT_CHANGED_EVENT = "app.environmentChanged";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { AegisShell } from './AegisShell';
|
|
2
|
+
export { useActiveApp } from './activeAppContext';
|
|
3
|
+
export type { ActiveAppContextValue } from './activeAppContext';
|
|
4
|
+
export { useAppHref, useAppNavigate } from './useAppNavigate';
|
|
5
|
+
export type { AegisApp, AegisAppNavGroup, AegisAppNavItem, AegisBrand, AegisShellProps, AegisUser, AegisUserMenuItem, } from './types';
|
|
6
|
+
export { ENVIRONMENT_CHANGED_EVENT, clearManifestCache, fetchManifest, manifestUrl, useCurrentEnvironment, useEnvironmentManifest, validateManifest, } from './environments';
|
|
7
|
+
export type { AegisAppEnvironmentsConfig, EnvironmentBadge, EnvironmentChangedEventDetail, EnvironmentDescriptor, EnvironmentManifest, EnvironmentManifestStatus, } from './environments';
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RouteObject } from 'react-router-dom';
|
|
3
|
+
import { Command } from '../../commands';
|
|
4
|
+
import { AegisAppEnvironmentsConfig } from './environments/types';
|
|
5
|
+
/**
|
|
6
|
+
* One entry in an app's internal left-nav. Sub-app authors only have to
|
|
7
|
+
* fill the URL and label; the shell renders + highlights.
|
|
8
|
+
*/
|
|
9
|
+
export interface AegisAppNavItem {
|
|
10
|
+
/** Relative path within the app, e.g. 'list' or 'create'. */
|
|
11
|
+
to: string;
|
|
12
|
+
label: string;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** Match `to` exactly (default: false, matches as prefix). */
|
|
15
|
+
end?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface AegisAppNavGroup {
|
|
18
|
+
/** Optional section heading. Omit for an ungrouped list. */
|
|
19
|
+
label?: string;
|
|
20
|
+
items: AegisAppNavItem[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Contract every sub-app exposes. Apps are presentational + routed; they
|
|
24
|
+
* don't render the chrome themselves — the shell does.
|
|
25
|
+
*/
|
|
26
|
+
export interface AegisApp {
|
|
27
|
+
/** Stable identifier — used for analytics + as React key. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** Display name in the global app list. */
|
|
30
|
+
label: string;
|
|
31
|
+
/** Icon shown next to the label in the sidebar's global section. */
|
|
32
|
+
icon: ReactNode;
|
|
33
|
+
/** All routes mount under this path. Must start with '/'. */
|
|
34
|
+
basePath: string;
|
|
35
|
+
/**
|
|
36
|
+
* react-router v6 routes. Paths inside are relative to `basePath`.
|
|
37
|
+
* Use route.lazy for code-splitting.
|
|
38
|
+
*/
|
|
39
|
+
routes: RouteObject[];
|
|
40
|
+
/** Optional inner sidebar shown when this app is active. */
|
|
41
|
+
sidebar?: AegisAppNavGroup[];
|
|
42
|
+
/**
|
|
43
|
+
* Optional sub-header rendered between the shell's `TopHeader` and the
|
|
44
|
+
* page content. Use for app-scoped toolbars, tab nav, filters, etc.
|
|
45
|
+
* Sticky by default so it stays in view while the page scrolls.
|
|
46
|
+
*
|
|
47
|
+
* Rendered inside `wrap`, so it can read from the app's Context.
|
|
48
|
+
*/
|
|
49
|
+
header?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Optional wrapper applied to the active app's region (header + page
|
|
52
|
+
* content). Use to mount Context providers shared between `header` and
|
|
53
|
+
* the routes — anything declared here is in scope for both.
|
|
54
|
+
*
|
|
55
|
+
* Must be a stable reference (module-level function or `useCallback`).
|
|
56
|
+
* Inlining `wrap={(c) => <P>{c}</P>}` re-mounts the provider on every
|
|
57
|
+
* shell render, blowing away its state.
|
|
58
|
+
*/
|
|
59
|
+
wrap?: (children: ReactNode) => ReactNode;
|
|
60
|
+
/** Optional one-line description shown in app pickers. */
|
|
61
|
+
description?: string;
|
|
62
|
+
/**
|
|
63
|
+
* If true, the app's routes still mount but it is omitted from the
|
|
64
|
+
* AppSwitcher. Use for configuration surfaces that are reachable from
|
|
65
|
+
* the user menu rather than the app launcher (e.g. /settings).
|
|
66
|
+
*/
|
|
67
|
+
hidden?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Commands exposed by this app. Registered by AegisShell when this
|
|
70
|
+
* app becomes active. (Contract only — wiring is a separate task.)
|
|
71
|
+
*/
|
|
72
|
+
commands?: Command[];
|
|
73
|
+
/**
|
|
74
|
+
* If false, the app is reachable by anonymous (unauthenticated) users
|
|
75
|
+
* and appears in the AppSwitcher / sidebar regardless of auth state.
|
|
76
|
+
* Default true — protected apps are hidden from anonymous users and
|
|
77
|
+
* routes show a sign-in CTA instead of content.
|
|
78
|
+
*/
|
|
79
|
+
requiresAuth?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Optional list of role tags. When set, only authenticated users whose
|
|
82
|
+
* `AegisAuthUser.roles` overlaps with this list can see the app. Apps
|
|
83
|
+
* without `requiredRoles` are visible to any authenticated user
|
|
84
|
+
* (subject to `requiresAuth`).
|
|
85
|
+
*/
|
|
86
|
+
requiredRoles?: string[];
|
|
87
|
+
/**
|
|
88
|
+
* Seed URL for backend-declared environment discovery. When set, the shell
|
|
89
|
+
* fetches `<apiBaseUrl><environments.discoveryPath>` (default
|
|
90
|
+
* `/.well-known/aegis-environments.json`) and renders an `<EnvironmentSwitcher>`
|
|
91
|
+
* in the top header for the active app. Apps observe selection via
|
|
92
|
+
* `useCurrentEnvironment()` or the `app.environmentChanged` runtime event.
|
|
93
|
+
*
|
|
94
|
+
* The shell does not rewrite axios base URLs — it surfaces the choice;
|
|
95
|
+
* apps consume it.
|
|
96
|
+
*/
|
|
97
|
+
apiBaseUrl?: string;
|
|
98
|
+
/** Optional knobs for environment discovery. See AegisAppEnvironmentsConfig. */
|
|
99
|
+
environments?: AegisAppEnvironmentsConfig;
|
|
100
|
+
}
|
|
101
|
+
export interface AegisUserMenuItem {
|
|
102
|
+
key: string;
|
|
103
|
+
label: ReactNode;
|
|
104
|
+
/** Router path to navigate to on click. Mutually exclusive with onClick. */
|
|
105
|
+
to?: string;
|
|
106
|
+
onClick?: () => void;
|
|
107
|
+
}
|
|
108
|
+
export interface AegisBrand {
|
|
109
|
+
name: ReactNode;
|
|
110
|
+
logo?: ReactNode;
|
|
111
|
+
/** Optional click target for the brand area (e.g. home path). */
|
|
112
|
+
href?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface AegisUser {
|
|
115
|
+
name: ReactNode;
|
|
116
|
+
avatar?: ReactNode;
|
|
117
|
+
/** Right-aligned dropdown entries in the top header. */
|
|
118
|
+
menu?: AegisUserMenuItem[];
|
|
119
|
+
}
|
|
120
|
+
export interface AegisShellProps {
|
|
121
|
+
brand: AegisBrand;
|
|
122
|
+
apps: AegisApp[];
|
|
123
|
+
/**
|
|
124
|
+
* Routes mounted at root (outside any app). Useful for a landing page
|
|
125
|
+
* or `/login`. Renders inside the shell unless `bare` is set.
|
|
126
|
+
*/
|
|
127
|
+
rootRoutes?: Array<RouteObject & {
|
|
128
|
+
bare?: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
/** Where to redirect when the URL doesn't match any app. */
|
|
131
|
+
fallbackPath?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Rendered (inside the shell chrome) when the URL matches no app and
|
|
134
|
+
* no `rootRoutes`. Takes precedence over `fallbackPath` — pass one or
|
|
135
|
+
* the other depending on whether you want a 404 page or a redirect.
|
|
136
|
+
*/
|
|
137
|
+
notFoundElement?: ReactNode;
|
|
138
|
+
user?: AegisUser;
|
|
139
|
+
/**
|
|
140
|
+
* User dropdown entries used when `user` is not passed explicitly and
|
|
141
|
+
* the shell is auto-building the menu from `useAuth()`. A Sign out
|
|
142
|
+
* entry (calling `signOut` from the auth context) is appended
|
|
143
|
+
* automatically when available.
|
|
144
|
+
*/
|
|
145
|
+
userMenu?: AegisUserMenuItem[];
|
|
146
|
+
/** Slot rendered in the top header center (e.g. global search). */
|
|
147
|
+
headerCenter?: ReactNode;
|
|
148
|
+
/** Slot rendered in the top header right side, before the user menu. */
|
|
149
|
+
headerActions?: ReactNode;
|
|
150
|
+
/**
|
|
151
|
+
* When set, a notification bell is rendered in the top header (between
|
|
152
|
+
* `headerActions` and the user menu) and clicking "View all" routes to
|
|
153
|
+
* this path. When omitted, the bell is not rendered — apps without a
|
|
154
|
+
* notification provider don't show an empty bell.
|
|
155
|
+
*/
|
|
156
|
+
inboxPath?: string;
|
|
157
|
+
/** Fired when the user navigates between apps. */
|
|
158
|
+
onAppSwitch?: (appId: string) => void;
|
|
159
|
+
/**
|
|
160
|
+
* When true, AegisShell mounts <CommandPalette/> and threads
|
|
161
|
+
* active-app scope into the command registry. Requires
|
|
162
|
+
* <CommandProvider/> above the shell. (Contract only — wiring is a
|
|
163
|
+
* separate task.)
|
|
164
|
+
*/
|
|
165
|
+
enableCommandPalette?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* When provided, AegisShell renders the node as a collapsible right-side
|
|
168
|
+
* panel (typically <AgentPanel/> filled with messages from useAgent()).
|
|
169
|
+
* The open state is owned by the host (read via the agent context's
|
|
170
|
+
* panelOpen field). Requires <AgentProvider/> above the shell.
|
|
171
|
+
*/
|
|
172
|
+
agentPanel?: ReactNode;
|
|
173
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NavigateOptions } from 'react-router-dom';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves an app-relative path against the active app's `basePath`.
|
|
4
|
+
*
|
|
5
|
+
* - A leading `/` is treated as app-root-relative: `link('/projects')` and
|
|
6
|
+
* `link('projects')` both produce `${basePath}/projects`.
|
|
7
|
+
* - An empty string resolves to the app root.
|
|
8
|
+
* - Fully qualified URLs (http://, mailto:) and hash-only links pass
|
|
9
|
+
* through untouched.
|
|
10
|
+
*
|
|
11
|
+
* Use this inside an AegisShell-mounted app instead of hardcoding the
|
|
12
|
+
* basePath, so the app stays portable if it gets re-mounted elsewhere.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAppHref(): (to: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Drop-in replacement for `useNavigate` that resolves paths against the
|
|
17
|
+
* active app's `basePath`. App code should never write absolute portal
|
|
18
|
+
* paths like `navigate('/projects')` — the shell decides where each app
|
|
19
|
+
* is mounted.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useAppNavigate(): (to: string, options?: NavigateOptions) => void;
|