@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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface RequireAuthProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
fallbackPath: string;
|
|
5
|
+
loadingFallback?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Route guard. While the context is still resolving (e.g. an SSO
|
|
9
|
+
* callback exchange), renders `loadingFallback` instead of redirecting
|
|
10
|
+
* — premature navigation would yank the user out of the callback flow.
|
|
11
|
+
*/
|
|
12
|
+
export declare function RequireAuth({ children, fallbackPath, loadingFallback, }: RequireAuthProps): ReactNode;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type AuthStatus = 'loading' | 'authenticated' | 'unauthenticated';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal user shape consumed by the shell + auth-aware primitives.
|
|
4
|
+
* SSO callers can extend with a custom generic on `AuthContextValue`.
|
|
5
|
+
*/
|
|
6
|
+
export interface AegisAuthUser {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
avatar?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Optional role / permission tags. The shell uses these to gate apps
|
|
13
|
+
* marked with `requiredRoles`. Empty / missing means "no role claims";
|
|
14
|
+
* apps without `requiredRoles` are unaffected.
|
|
15
|
+
*/
|
|
16
|
+
roles?: string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Contract every auth integration implements. The library does not own
|
|
20
|
+
* state — callers wire their own SSO / form / token-refresh logic and
|
|
21
|
+
* pass the resulting value through `<AuthProvider value={...}>`.
|
|
22
|
+
*
|
|
23
|
+
* `signIn` / `signOut` are optional: SSO flows typically redirect away
|
|
24
|
+
* and have no in-process credential exchange.
|
|
25
|
+
*/
|
|
26
|
+
export interface AuthContextValue<TUser = AegisAuthUser> {
|
|
27
|
+
status: AuthStatus;
|
|
28
|
+
user: TUser | null;
|
|
29
|
+
signIn?: (credentials: unknown) => Promise<void> | void;
|
|
30
|
+
signOut?: () => Promise<void> | void;
|
|
31
|
+
}
|
|
32
|
+
export declare const defaultAuthContextValue: AuthContextValue<unknown>;
|
|
33
|
+
export declare const AuthContext: import('react').Context<AuthContextValue<unknown>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AegisAuthUser, AuthContextValue } from './authContext';
|
|
2
|
+
/**
|
|
3
|
+
* Read the current auth context. Returns the default unauthenticated
|
|
4
|
+
* state when no `<AuthProvider>` is mounted, so render code does not
|
|
5
|
+
* have to special-case "auth not wired yet".
|
|
6
|
+
*/
|
|
7
|
+
export declare function useAuth<TUser = AegisAuthUser>(): AuthContextValue<TUser>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
interface CommandProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Owns the command registry, the palette open-state, and the global
|
|
7
|
+
* `mod+k` opener. Apps inside register commands via
|
|
8
|
+
* `useRegisterCommands`; AegisShell flips the active scope as the user
|
|
9
|
+
* navigates between sub-apps.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CommandProvider({ children, }: CommandProviderProps): ReactElement;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AegisAction } from '../agent/types';
|
|
3
|
+
/**
|
|
4
|
+
* A single executable action surfaced through the command palette and,
|
|
5
|
+
* eventually, agent tool-calls. Commands are presentational contracts —
|
|
6
|
+
* the host owns the side-effect inside `handler`.
|
|
7
|
+
*/
|
|
8
|
+
export interface Command<TArgs = unknown> {
|
|
9
|
+
/** Globally unique id. Convention: 'app.action' e.g. 'projects.create'. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Human label shown in the palette. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Longer description — also shown to agents as tool description. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Search keywords (lowercase). */
|
|
16
|
+
keywords?: string[];
|
|
17
|
+
/** Icon node shown in the palette row. */
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
/** UI grouping (e.g. 'Quick actions', 'Navigate'). Default: 'Other'. */
|
|
20
|
+
group?: string;
|
|
21
|
+
/** Keybinding using 'mod' for Cmd/Ctrl, e.g. 'mod+shift+p'. */
|
|
22
|
+
shortcut?: string;
|
|
23
|
+
/** When set, command is only available while this AegisApp is active. */
|
|
24
|
+
scope?: string;
|
|
25
|
+
/** Hide from palette UI; still callable via execute() (used by agents). */
|
|
26
|
+
agentOnly?: boolean;
|
|
27
|
+
/** JSON-schema-ish param description for agents. Library doesn't parse it. */
|
|
28
|
+
schema?: Record<string, unknown>;
|
|
29
|
+
/** The actual side-effect. */
|
|
30
|
+
handler: (args?: TArgs) => void | Promise<void>;
|
|
31
|
+
/** Optional undo callback — UI will surface an Undo affordance. */
|
|
32
|
+
undo?: () => void | Promise<void>;
|
|
33
|
+
/** Optional aegis-ui agent action — fired alongside handler from the palette. */
|
|
34
|
+
action?: AegisAction<void, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Contract exposed by the CommandProvider. Unlike auth/notifications,
|
|
38
|
+
* the library owns this state — the registry only makes sense as a
|
|
39
|
+
* library-managed runtime.
|
|
40
|
+
*/
|
|
41
|
+
export interface CommandContextValue {
|
|
42
|
+
/** All registered commands, scope-filtered for the current active app. */
|
|
43
|
+
commands: Command[];
|
|
44
|
+
/** All registered commands regardless of scope (for agents). */
|
|
45
|
+
allCommands: Command[];
|
|
46
|
+
/** Register a batch of commands. Returns an unregister function. */
|
|
47
|
+
register: (cmds: Command[]) => () => void;
|
|
48
|
+
/** Set the active scope (called by AegisShell — apps don't touch this). */
|
|
49
|
+
setActiveScope: (scope: string | undefined) => void;
|
|
50
|
+
/** Execute by id. Throws if no command with that id. */
|
|
51
|
+
execute: (id: string, args?: unknown) => Promise<void>;
|
|
52
|
+
/** Open or close the palette. */
|
|
53
|
+
setPaletteOpen: (open: boolean) => void;
|
|
54
|
+
paletteOpen: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare const defaultCommandContextValue: CommandContextValue;
|
|
57
|
+
export declare const CommandContext: import('react').Context<CommandContextValue>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { CommandProvider } from './CommandProvider';
|
|
2
|
+
export { useCommands } from './useCommands';
|
|
3
|
+
export { useRegisterCommands } from './useRegisterCommands';
|
|
4
|
+
export { formatShortcut } from './shortcut';
|
|
5
|
+
export type { Command, CommandContextValue } from './commandContext';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny shortcut helper — parses 'mod+shift+p'-style bindings, matches
|
|
3
|
+
* KeyboardEvents, and formats for display.
|
|
4
|
+
*
|
|
5
|
+
* 'mod' resolves to ⌘ on macOS and Ctrl elsewhere. Single-character
|
|
6
|
+
* keys are matched case-insensitively against `event.key`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function matchShortcut(event: KeyboardEvent, binding: string): boolean;
|
|
9
|
+
export declare function formatShortcut(binding: string): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command } from './commandContext';
|
|
2
|
+
/**
|
|
3
|
+
* Register a batch of commands while the calling component is mounted.
|
|
4
|
+
* The effect re-runs only when the set of command ids changes — passing
|
|
5
|
+
* a new array literal every render does not thrash the registry.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useRegisterCommands(cmds: Command[]): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
export interface AgentPanelSurface {
|
|
4
|
+
id: string;
|
|
5
|
+
kind?: SurfaceKind;
|
|
6
|
+
label?: string;
|
|
7
|
+
project?: () => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
8
|
+
askSuggestions?: string[];
|
|
9
|
+
ask?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface AgentPanelProps {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** Header right-side slot (e.g. close button). */
|
|
14
|
+
headerActions?: ReactNode;
|
|
15
|
+
/** The conversation area — typically ChatMessageList. */
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/** Sticky footer — typically ChatComposer. */
|
|
18
|
+
footer?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
surface?: AgentPanelSurface;
|
|
21
|
+
}
|
|
22
|
+
export declare function AgentPanel({ title, headerActions, children, footer, className, surface, }: AgentPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default AgentPanel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface AuthLayoutProps {
|
|
3
|
+
brand?: ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
footer?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function AuthLayout({ brand, title, description, children, footer, className, }: AuthLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default AuthLayout;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
type AvatarSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
5
|
+
export interface AvatarSurface {
|
|
6
|
+
id: string;
|
|
7
|
+
kind?: SurfaceKind;
|
|
8
|
+
label?: string;
|
|
9
|
+
project: (data: {
|
|
10
|
+
name: string;
|
|
11
|
+
status?: AvatarStatus;
|
|
12
|
+
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
13
|
+
askSuggestions?: string[];
|
|
14
|
+
ask?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface AvatarProps {
|
|
17
|
+
name: string;
|
|
18
|
+
src?: string;
|
|
19
|
+
size?: AvatarSize;
|
|
20
|
+
status?: AvatarStatus;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
surface?: AvatarSurface;
|
|
24
|
+
}
|
|
25
|
+
export declare function Avatar({ name, src, size, status, icon, className, surface, }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default Avatar;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
2
|
+
export interface BlastRadiusBarSurface {
|
|
3
|
+
id: string;
|
|
4
|
+
kind?: SurfaceKind;
|
|
5
|
+
label?: string;
|
|
6
|
+
project: (data: {
|
|
7
|
+
value: number;
|
|
8
|
+
centerLabel?: string;
|
|
9
|
+
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
10
|
+
askSuggestions?: string[];
|
|
11
|
+
ask?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface BlastRadiusBarProps {
|
|
14
|
+
/** 0 – 100 */
|
|
15
|
+
value: number;
|
|
16
|
+
/** Optional descriptive label for the current value (right-aligned, mid). */
|
|
17
|
+
centerLabel?: string;
|
|
18
|
+
/** Hide the 0 / 100 endpoints. */
|
|
19
|
+
hideTicks?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
surface?: BlastRadiusBarSurface;
|
|
22
|
+
}
|
|
23
|
+
export declare function BlastRadiusBar({ value, centerLabel, hideTicks, className, surface, }: BlastRadiusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default BlastRadiusBar;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
/** Optional destination. If omitted, the item renders as plain text. */
|
|
5
|
+
to?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Render-prop signature for routed links. Sub-apps that use a router
|
|
9
|
+
* (`react-router-dom`, `@tanstack/router`, Next.js) pass a wrapper that
|
|
10
|
+
* forwards to their `<Link>`. Keeping this contract minimal so the primitive
|
|
11
|
+
* has zero router dependency.
|
|
12
|
+
*/
|
|
13
|
+
export type BreadcrumbLinkComponent = ComponentType<{
|
|
14
|
+
to: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
interface BreadcrumbProps {
|
|
19
|
+
items: BreadcrumbItem[];
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Component used to render linked breadcrumb items. Defaults to an
|
|
23
|
+
* unstyled `<a href>`. Sub-apps using a router should pass their
|
|
24
|
+
* Link adapter here.
|
|
25
|
+
*/
|
|
26
|
+
linkComponent?: BreadcrumbLinkComponent;
|
|
27
|
+
}
|
|
28
|
+
export declare function Breadcrumb({ items, className, linkComponent, }: BreadcrumbProps): ReactElement;
|
|
29
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface BucketCardProps {
|
|
3
|
+
name: ReactNode;
|
|
4
|
+
/** Driver shown as a ghost chip (e.g. `s3`, `localfs`). */
|
|
5
|
+
driver?: string;
|
|
6
|
+
/** Max object size per bucket, in bytes. */
|
|
7
|
+
maxObjectBytes?: number;
|
|
8
|
+
/** Retention window in days; 0 / undefined = none. */
|
|
9
|
+
retentionDays?: number;
|
|
10
|
+
/** Surfaces an anomaly-red dot when true (public bucket = attention). */
|
|
11
|
+
publicRead?: boolean;
|
|
12
|
+
/** Optional object count / size summary shown on the right. */
|
|
13
|
+
objectCount?: number;
|
|
14
|
+
totalBytes?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Row of quick-action buttons (e.g. settings icon button).
|
|
17
|
+
* Revealed on hover via CSS.
|
|
18
|
+
*/
|
|
19
|
+
quickActions?: ReactNode;
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function BucketCard({ name, driver, maxObjectBytes, retentionDays, publicRead, objectCount, totalBytes, quickActions, onClick, className, }: BucketCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default BucketCard;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { AegisAction } from '../../agent/types';
|
|
3
|
+
type NativeButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'children'>;
|
|
4
|
+
interface ButtonProps extends NativeButtonProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Visual treatment. */
|
|
7
|
+
tone?: 'primary' | 'secondary' | 'ghost';
|
|
8
|
+
/** Optional aegis-ui agent action — also wires the agent runtime. */
|
|
9
|
+
action?: AegisAction<void, unknown>;
|
|
10
|
+
/** Native HTML button type. */
|
|
11
|
+
type?: 'button' | 'submit' | 'reset';
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ChatComposerProps {
|
|
2
|
+
onSend: (content: string) => void | Promise<void>;
|
|
3
|
+
sending?: boolean;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
/** Optional disabled state with a reason shown in a small banner. */
|
|
6
|
+
disabledReason?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function ChatComposer({ onSend, sending, placeholder, disabledReason, className, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default ChatComposer;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AgentMessageRole } from '../../agent/agentContext';
|
|
3
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
4
|
+
export interface ChatMessageSurface {
|
|
5
|
+
id: string;
|
|
6
|
+
kind?: SurfaceKind;
|
|
7
|
+
label?: string;
|
|
8
|
+
project: (data: {
|
|
9
|
+
role: AgentMessageRole;
|
|
10
|
+
content: ReactNode;
|
|
11
|
+
timestamp?: string;
|
|
12
|
+
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
13
|
+
askSuggestions?: string[];
|
|
14
|
+
ask?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface ChatMessageProps {
|
|
17
|
+
role: AgentMessageRole;
|
|
18
|
+
content: ReactNode;
|
|
19
|
+
/** Optional timestamp. ISO or already-formatted string. */
|
|
20
|
+
timestamp?: string;
|
|
21
|
+
/** Avatar slot — typically <Avatar/> or an icon. */
|
|
22
|
+
avatar?: ReactNode;
|
|
23
|
+
/** Optional name above the bubble (e.g. "You" / "Aegis Assistant"). */
|
|
24
|
+
senderName?: ReactNode;
|
|
25
|
+
/** Rendered after content — typically CommandInvocationCard list. */
|
|
26
|
+
footer?: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
surface?: ChatMessageSurface;
|
|
29
|
+
}
|
|
30
|
+
export declare function ChatMessage({ role, content, timestamp, avatar, senderName, footer, className, surface, }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default ChatMessage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
export interface ChatMessageListSurface {
|
|
4
|
+
id: string;
|
|
5
|
+
kind?: SurfaceKind;
|
|
6
|
+
label?: string;
|
|
7
|
+
project: (count: number) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
8
|
+
askSuggestions?: string[];
|
|
9
|
+
ask?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface ChatMessageListProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Auto-scroll to bottom on children change. Default: true. */
|
|
14
|
+
autoScroll?: boolean;
|
|
15
|
+
/** Slot rendered before the messages (e.g. day header). */
|
|
16
|
+
header?: ReactNode;
|
|
17
|
+
/** Slot rendered after the last message (e.g. typing indicator). */
|
|
18
|
+
footer?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
surface?: ChatMessageListSurface;
|
|
21
|
+
}
|
|
22
|
+
export declare function ChatMessageList({ children, autoScroll, header, footer, className, surface, }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default ChatMessageList;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface ChatSessionItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
/** Unix ms; the primitive will format it as relative time. */
|
|
6
|
+
timestamp?: number;
|
|
7
|
+
/** True for the currently selected row. */
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ChatSessionListProps {
|
|
11
|
+
items: ChatSessionItem[];
|
|
12
|
+
onSelect: (id: string) => void;
|
|
13
|
+
onRename?: (id: string, nextTitle: string) => void;
|
|
14
|
+
onDelete?: (id: string) => void;
|
|
15
|
+
/** Visual density. Compact = dock popover; comfortable = full-page rail. */
|
|
16
|
+
density?: 'compact' | 'comfortable';
|
|
17
|
+
/** Empty-state slot. Default: nothing — host decides. */
|
|
18
|
+
emptyState?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function ChatSessionList({ items, onSelect, onRename, onDelete, density, emptyState, className, }: ChatSessionListProps): ReactElement;
|
|
22
|
+
export default ChatSessionList;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
export interface ChipSurface {
|
|
4
|
+
id: string;
|
|
5
|
+
kind?: SurfaceKind;
|
|
6
|
+
label?: string;
|
|
7
|
+
project: (children: ReactNode) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
8
|
+
askSuggestions?: string[];
|
|
9
|
+
ask?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface ChipProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Visual treatment. */
|
|
14
|
+
tone?: 'default' | 'ink' | 'warning' | 'ghost';
|
|
15
|
+
/** Optional leading dot/icon node. */
|
|
16
|
+
leading?: ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
surface?: ChipSurface;
|
|
20
|
+
}
|
|
21
|
+
export declare function Chip({ children, tone, leading, className, onClick, surface, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default Chip;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
2
|
+
export interface CodeBlockSurface {
|
|
3
|
+
id: string;
|
|
4
|
+
kind?: SurfaceKind;
|
|
5
|
+
label?: string;
|
|
6
|
+
project: (data: {
|
|
7
|
+
code: string;
|
|
8
|
+
language: string;
|
|
9
|
+
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
10
|
+
askSuggestions?: string[];
|
|
11
|
+
ask?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface CodeBlockProps {
|
|
14
|
+
code: string;
|
|
15
|
+
language?: 'json' | 'yaml' | 'sql' | 'bash' | 'text';
|
|
16
|
+
showLineNumbers?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
surface?: CodeBlockSurface;
|
|
19
|
+
}
|
|
20
|
+
export declare function CodeBlock({ code, language, showLineNumbers, className, surface, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default CodeBlock;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
export type CodeEditorLanguage = 'json' | 'yaml' | 'sql' | 'text';
|
|
4
|
+
/** Schema hint for SQL autocompletion. */
|
|
5
|
+
export interface CodeEditorField {
|
|
6
|
+
name: string;
|
|
7
|
+
/** Optional ClickHouse type ('UInt64', 'Map(String,String)', …) shown alongside the suggestion. */
|
|
8
|
+
type?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CodeEditorSurface {
|
|
11
|
+
id: string;
|
|
12
|
+
kind?: SurfaceKind;
|
|
13
|
+
label?: string;
|
|
14
|
+
project: (data: {
|
|
15
|
+
value: string;
|
|
16
|
+
language: CodeEditorLanguage;
|
|
17
|
+
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
18
|
+
askSuggestions?: string[];
|
|
19
|
+
ask?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface CodeEditorProps {
|
|
22
|
+
value: string;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
24
|
+
language?: CodeEditorLanguage;
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
/** CodeMirror theme variant — 'auto' follows the host's color-scheme. */
|
|
27
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/** Editor height; numbers are treated as px. */
|
|
30
|
+
height?: number | string;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
surface?: CodeEditorSurface;
|
|
34
|
+
/** SQL-only: schema columns surfaced in autocomplete (language='sql'). */
|
|
35
|
+
fields?: CodeEditorField[];
|
|
36
|
+
/** SQL-only: table names surfaced in autocomplete (language='sql'). */
|
|
37
|
+
tables?: string[];
|
|
38
|
+
/** Fires on Cmd/Ctrl+Enter — useful for run-this-query affordances. */
|
|
39
|
+
onSubmit?: (value: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare function CodeEditor({ value, onChange, language, readOnly, theme, placeholder, height, className, style, surface, fields, tables, onSubmit, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export default CodeEditor;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
2
|
+
export interface CommandInvocationCardSurface {
|
|
3
|
+
id: string;
|
|
4
|
+
kind?: SurfaceKind;
|
|
5
|
+
label?: string;
|
|
6
|
+
project: (data: {
|
|
7
|
+
commandId: string;
|
|
8
|
+
args?: unknown;
|
|
9
|
+
status: 'pending' | 'success' | 'error';
|
|
10
|
+
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
11
|
+
askSuggestions?: string[];
|
|
12
|
+
ask?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface CommandInvocationCardProps {
|
|
15
|
+
commandId: string;
|
|
16
|
+
args?: unknown;
|
|
17
|
+
status: 'pending' | 'success' | 'error';
|
|
18
|
+
error?: string;
|
|
19
|
+
onUndo?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
surface?: CommandInvocationCardSurface;
|
|
22
|
+
}
|
|
23
|
+
export declare function CommandInvocationCard({ commandId, args, status, error, onUndo, className, surface, }: CommandInvocationCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default CommandInvocationCard;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { AegisAction } from '../../agent/types';
|
|
3
|
+
interface ControlListItemProps {
|
|
4
|
+
/** Left-side content (e.g. dot + label). */
|
|
5
|
+
left: ReactNode;
|
|
6
|
+
/** Right-side content (e.g. status text or action button). */
|
|
7
|
+
right?: ReactNode;
|
|
8
|
+
/** Inverts the row to ink — used for the currently-active item. */
|
|
9
|
+
active?: boolean;
|
|
10
|
+
/** Click target — when present, row becomes a button. */
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
/** Optional aegis-ui agent action — fired after onClick if not prevented. */
|
|
13
|
+
action?: AegisAction<void, unknown>;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function ControlListItem({ left, right, active, onClick, action, className, style, }: ControlListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default ControlListItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface DangerZoneProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function DangerZone({ title, description, children, className, }: DangerZoneProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default DangerZone;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
export interface DataListColumn<T> {
|
|
4
|
+
key: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
render?: (row: T) => ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface DataListItem {
|
|
9
|
+
id: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DataListSurface<T> {
|
|
12
|
+
id: string;
|
|
13
|
+
kind?: SurfaceKind;
|
|
14
|
+
label?: string;
|
|
15
|
+
project: (rows: T[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
16
|
+
askSuggestions?: string[];
|
|
17
|
+
/** When false, AskOverlay skips this surface (per docs §7.1). */
|
|
18
|
+
ask?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface DataListProps<T extends DataListItem> {
|
|
21
|
+
items: T[];
|
|
22
|
+
columns: Array<DataListColumn<T>>;
|
|
23
|
+
selectedId?: string;
|
|
24
|
+
onSelect?: (id: string) => void;
|
|
25
|
+
surface?: DataListSurface<T>;
|
|
26
|
+
emptyText?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function DataList<T extends DataListItem>({ items, columns, selectedId, onSelect, surface, emptyText, className, }: DataListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export default DataList;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
|
|
3
|
+
export interface DataTableSurface<T> {
|
|
4
|
+
id: string;
|
|
5
|
+
kind?: SurfaceKind;
|
|
6
|
+
label?: string;
|
|
7
|
+
project: (rows: T[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
8
|
+
askSuggestions?: string[];
|
|
9
|
+
ask?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface DataTableColumn<T> {
|
|
12
|
+
key: string;
|
|
13
|
+
header: ReactNode;
|
|
14
|
+
/** Initial column width. Number → px, string → as-is (e.g. '20%'). */
|
|
15
|
+
width?: number | string;
|
|
16
|
+
/** Minimum width during resize / when content squeezes. Default 60px. */
|
|
17
|
+
minWidth?: number;
|
|
18
|
+
/** Maximum width during resize. */
|
|
19
|
+
maxWidth?: number;
|
|
20
|
+
align?: 'left' | 'center' | 'right';
|
|
21
|
+
/**
|
|
22
|
+
* Whether the cell should ellipsis-truncate long content. Default true.
|
|
23
|
+
* Set false for action cells, chip rows, or anything with non-text content
|
|
24
|
+
* that should keep its natural width without being clipped.
|
|
25
|
+
*/
|
|
26
|
+
truncate?: boolean;
|
|
27
|
+
/** Allow dragging the right edge of this column to resize. Default false. */
|
|
28
|
+
resizable?: boolean;
|
|
29
|
+
render: (row: T, index: number) => ReactNode;
|
|
30
|
+
}
|
|
31
|
+
interface DataTableProps<T> {
|
|
32
|
+
columns: Array<DataTableColumn<T>>;
|
|
33
|
+
data: T[];
|
|
34
|
+
rowKey: (row: T, index: number) => string | number;
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
emptyTitle?: string;
|
|
37
|
+
emptyDescription?: string;
|
|
38
|
+
emptyAction?: ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
/**
|
|
41
|
+
* When set, resized column widths are persisted to localStorage under
|
|
42
|
+
* `aegis-data-table:<persistKey>`. Use a stable key per table.
|
|
43
|
+
*/
|
|
44
|
+
persistKey?: string;
|
|
45
|
+
surface?: DataTableSurface<T>;
|
|
46
|
+
}
|
|
47
|
+
export declare function DataTable<T>({ columns, data, rowKey, loading, emptyTitle, emptyDescription, emptyAction, className, persistKey, surface, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export default DataTable;
|