@kb-labs/studio-app 0.7.0 → 2.8.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/dist/index.html +1 -0
- package/dist/main.1d68e922.js +522 -0
- package/dist/main.1d68e922.js.map +1 -0
- package/dist/main.80b70197.css +2 -0
- package/dist/main.80b70197.css.map +1 -0
- package/dist/mf-manifest.json +241 -0
- package/dist/mf-stats.json +271 -0
- package/package.json +56 -39
- package/server.js +68 -0
- package/.env.example +0 -10
- package/UI-KIT-COMPONENTS.md +0 -783
- package/UI-KIT-PLAN.md +0 -326
- package/eslint-rules/no-direct-antd-import.js +0 -151
- package/eslint.config.ts +0 -27
- package/index.html +0 -17
- package/postcss.config.js +0 -7
- package/public/favicon.ico +0 -0
- package/rspack.config.mjs +0 -118
- package/src/App.tsx +0 -46
- package/src/components/devtools/devtools-log-feed.module.css +0 -165
- package/src/components/devtools/devtools-log-feed.tsx +0 -300
- package/src/components/devtools/devtools-panel.module.css +0 -121
- package/src/components/devtools/devtools-panel.tsx +0 -115
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -210
- package/src/components/health-banner.module.css +0 -103
- package/src/components/health-banner.tsx +0 -134
- package/src/components/health-indicator.tsx +0 -12
- package/src/components/page-header.tsx +0 -49
- package/src/components/page-transition.tsx +0 -24
- package/src/components/role-switcher.tsx +0 -148
- package/src/components/run-badge.tsx +0 -13
- package/src/components/ui/icons.tsx +0 -509
- package/src/components/ui/index.ts +0 -25
- package/src/components/ui/kb-config-provider.tsx +0 -130
- package/src/components/ui/kb-header.module.css +0 -51
- package/src/components/ui/kb-header.tsx +0 -112
- package/src/components/ui/kb-notification-bell.module.css +0 -103
- package/src/components/ui/kb-notification-bell.tsx +0 -199
- package/src/components/ui/kb-page-layout.tsx +0 -66
- package/src/components/ui/kb-quick-search.module.css +0 -86
- package/src/components/ui/kb-quick-search.tsx +0 -196
- package/src/components/ui/kb-sidebar.module.css +0 -47
- package/src/components/ui/kb-sidebar.tsx +0 -196
- package/src/components/ui/kb-stat-card.module.css +0 -21
- package/src/components/ui/kb-stat-card.tsx +0 -22
- package/src/components/ui/kb-stat-grid.tsx +0 -22
- package/src/components/ui/kb-status-bar.module.css +0 -49
- package/src/components/ui/kb-status-bar.tsx +0 -145
- package/src/components/ui/kb-system-health-indicator.tsx +0 -229
- package/src/components/ui/kb-theme-toggle.tsx +0 -42
- package/src/components/ui/theme-adapter.ts +0 -812
- package/src/components/ui/theme-transition-overlay.tsx +0 -70
- package/src/components/ui/utils.ts +0 -6
- package/src/components/widget-error-boundary.tsx +0 -172
- package/src/config/env.ts +0 -5
- package/src/config/feature-flags.ts +0 -482
- package/src/config/studio.config.schema.ts +0 -88
- package/src/config/studio.config.ts +0 -84
- package/src/env.d.ts +0 -23
- package/src/hooks/use-command-palette.ts +0 -6
- package/src/hooks/use-devtools-store.ts +0 -25
- package/src/hooks/use-feature-flags.ts +0 -101
- package/src/index.css +0 -10
- package/src/layouts/dashboard-grid.tsx +0 -122
- package/src/layouts/index.ts +0 -12
- package/src/layouts/two-pane.tsx +0 -134
- package/src/main.tsx +0 -15
- package/src/modules/analytics/components/analytics-daily-stats-chart.tsx +0 -257
- package/src/modules/analytics/components/analytics-date-range-picker.tsx +0 -121
- package/src/modules/analytics/pages/analytics-cache-page.tsx +0 -285
- package/src/modules/analytics/pages/analytics-embeddings-page.tsx +0 -274
- package/src/modules/analytics/pages/analytics-events-page.tsx +0 -425
- package/src/modules/analytics/pages/analytics-llm-page.tsx +0 -434
- package/src/modules/analytics/pages/analytics-overview-page.tsx +0 -336
- package/src/modules/analytics/pages/analytics-page.tsx +0 -20
- package/src/modules/analytics/pages/analytics-storage-page.tsx +0 -344
- package/src/modules/analytics/pages/analytics-vectorstore-page.tsx +0 -279
- package/src/modules/analytics/routes/index.tsx +0 -133
- package/src/modules/analytics/utils/formatters.test.ts +0 -148
- package/src/modules/analytics/utils/formatters.ts +0 -100
- package/src/modules/auth/pages/login-page.module.css +0 -113
- package/src/modules/auth/pages/login-page.tsx +0 -80
- package/src/modules/auth/routes/index.tsx +0 -24
- package/src/modules/dashboard/components/ActivityTimelineWidget.tsx +0 -199
- package/src/modules/dashboard/components/AiInsightsWidget.tsx +0 -358
- package/src/modules/dashboard/components/AnimatedMetricCard.css +0 -88
- package/src/modules/dashboard/components/AnimatedMetricCard.tsx +0 -125
- package/src/modules/dashboard/components/HeroMetricCard.css +0 -114
- package/src/modules/dashboard/components/HeroMetricCard.tsx +0 -152
- package/src/modules/dashboard/components/HeroMetricsWidget.tsx +0 -146
- package/src/modules/dashboard/components/SystemResourcesWidget.tsx +0 -197
- package/src/modules/dashboard/components/dashboard-empty.tsx +0 -22
- package/src/modules/dashboard/components/dashboard-kpis-widget.tsx +0 -59
- package/src/modules/dashboard/components/dashboard-kpis.tsx +0 -13
- package/src/modules/dashboard/components/dashboard-latency-percentiles-widget.tsx +0 -85
- package/src/modules/dashboard/components/dashboard-metrics-widget.tsx +0 -78
- package/src/modules/dashboard/components/dashboard-plugins-widget.tsx +0 -67
- package/src/modules/dashboard/components/dashboard-requests-widget.tsx +0 -62
- package/src/modules/dashboard/layouts/dashboard-layout.tsx +0 -16
- package/src/modules/dashboard/pages/ai-insights-page.tsx +0 -563
- package/src/modules/dashboard/pages/dashboard-animations.css +0 -317
- package/src/modules/dashboard/pages/dashboard-page.tsx +0 -13
- package/src/modules/dashboard/routes/index.tsx +0 -70
- package/src/modules/observability/pages/devkit-page.tsx +0 -263
- package/src/modules/observability/pages/incident-detail-page.tsx +0 -571
- package/src/modules/observability/pages/incidents-page.tsx +0 -370
- package/src/modules/observability/pages/log-detail-page.tsx +0 -508
- package/src/modules/observability/pages/logs-page.tsx +0 -1129
- package/src/modules/observability/pages/prometheus-metrics-page.tsx +0 -486
- package/src/modules/observability/pages/state-broker-page.tsx +0 -229
- package/src/modules/observability/pages/system-events-page.tsx +0 -255
- package/src/modules/observability/routes/index.tsx +0 -133
- package/src/modules/plugins/components/marketplace-card.tsx +0 -153
- package/src/modules/plugins/components/plugin-ai-assistant-modal.tsx +0 -374
- package/src/modules/plugins/components/plugin-card.tsx +0 -136
- package/src/modules/plugins/components/plugin-detail/capabilities-summary.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/cli-commands-table.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/index.ts +0 -7
- package/src/modules/plugins/components/plugin-detail/jobs-table.tsx +0 -64
- package/src/modules/plugins/components/plugin-detail/permissions/env-permissions.tsx +0 -30
- package/src/modules/plugins/components/plugin-detail/permissions/filesystem-permissions.tsx +0 -68
- package/src/modules/plugins/components/plugin-detail/permissions/index.ts +0 -6
- package/src/modules/plugins/components/plugin-detail/permissions/network-permissions.tsx +0 -43
- package/src/modules/plugins/components/plugin-detail/permissions/platform-services.tsx +0 -242
- package/src/modules/plugins/components/plugin-detail/permissions/resource-quotas.tsx +0 -96
- package/src/modules/plugins/components/plugin-detail/permissions/shell-permissions.tsx +0 -55
- package/src/modules/plugins/components/plugin-detail/permissions-view.tsx +0 -47
- package/src/modules/plugins/components/plugin-detail/plugin-header.tsx +0 -169
- package/src/modules/plugins/components/plugin-detail/rest-routes-table.tsx +0 -159
- package/src/modules/plugins/components/plugin-detail/workflows-table.tsx +0 -40
- package/src/modules/plugins/components/plugin-grid.tsx +0 -20
- package/src/modules/plugins/components/plugin-table.tsx +0 -178
- package/src/modules/plugins/pages/marketplace-page.tsx +0 -200
- package/src/modules/plugins/pages/plugin-detail-page.tsx +0 -1145
- package/src/modules/plugins/routes/index.tsx +0 -48
- package/src/modules/plugins/utils/index.ts +0 -1
- package/src/modules/plugins/utils/schema-helpers.ts +0 -21
- package/src/modules/settings/components/api-routes-viewer.tsx +0 -415
- package/src/modules/settings/components/appearance-settings.tsx +0 -200
- package/src/modules/settings/components/configuration-settings.tsx +0 -321
- package/src/modules/settings/components/data-privacy-settings.tsx +0 -111
- package/src/modules/settings/components/experimental-settings.tsx +0 -243
- package/src/modules/settings/components/navigation-settings.tsx +0 -198
- package/src/modules/settings/components/notifications-settings.tsx +0 -40
- package/src/modules/settings/pages/settings-page.tsx +0 -298
- package/src/modules/settings/routes/index.tsx +0 -47
- package/src/pages/README-assistant.md +0 -91
- package/src/pages/login-page.tsx +0 -177
- package/src/pages/not-found-page.tsx +0 -85
- package/src/providers/auth-provider.tsx +0 -40
- package/src/providers/command-palette-provider.tsx +0 -193
- package/src/providers/data-sources-provider.tsx +0 -27
- package/src/providers/devtools-provider.tsx +0 -72
- package/src/providers/navigation-items-provider.tsx +0 -38
- package/src/providers/registry-v2-provider.tsx +0 -93
- package/src/providers/settings-provider.tsx +0 -158
- package/src/router.tsx +0 -302
- package/src/routes/helpers.tsx +0 -25
- package/src/routes/plugin-page-v2.tsx +0 -52
- package/src/routes/types.ts +0 -18
- package/src/styles/antd-overrides.css +0 -211
- package/src/styles/base.css +0 -190
- package/src/styles/settings.css +0 -75
- package/src/styles/variables.css +0 -94
- package/src/utils/analytics.ts +0 -183
- package/src/utils/apply-navigation-categories.ts +0 -83
- package/src/utils/commands.ts +0 -252
- package/src/utils/export.ts +0 -174
- package/src/utils/format-date.ts +0 -166
- package/src/utils/logger.ts +0 -110
- package/tailwind.config.ts +0 -13
- package/tsconfig.json +0 -13
- package/vitest-setup.ts +0 -1
- /package/{public → dist}/favicon.svg +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { UICard, UIRow, UICol } from '@kb-labs/studio-ui-kit';
|
|
2
|
-
import { HolderOutlined } from '@ant-design/icons';
|
|
3
|
-
import { usePrometheusMetrics } from '@kb-labs/studio-data-client';
|
|
4
|
-
import { useDataSources } from '../../../providers/data-sources-provider';
|
|
5
|
-
import { KBStatCard } from '@/components/ui';
|
|
6
|
-
|
|
7
|
-
export function DashboardMetricsWidget() {
|
|
8
|
-
const sources = useDataSources();
|
|
9
|
-
const { data: metrics } = usePrometheusMetrics(sources.observability);
|
|
10
|
-
|
|
11
|
-
const totalRequests = metrics?.requests?.total ?? 0;
|
|
12
|
-
const totalErrors = (metrics?.requests?.clientErrors ?? 0) + (metrics?.requests?.serverErrors ?? 0);
|
|
13
|
-
const errorRate = totalRequests > 0 ? (totalErrors / totalRequests) * 100 : 0;
|
|
14
|
-
const avgLatency = metrics?.latency?.average ?? 0;
|
|
15
|
-
const p95 = metrics?.latency?.p95 ?? 0;
|
|
16
|
-
const uptime = metrics?.uptime?.seconds ?? 0;
|
|
17
|
-
|
|
18
|
-
const formatUptime = (seconds: number): string => {
|
|
19
|
-
const hours = Math.floor(seconds / 3600);
|
|
20
|
-
const minutes = Math.floor((seconds % 3600) / 60);
|
|
21
|
-
if (hours > 0) {
|
|
22
|
-
return `${hours}h ${minutes}m`;
|
|
23
|
-
}
|
|
24
|
-
return `${minutes}m`;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<UICard
|
|
29
|
-
title={
|
|
30
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
31
|
-
<HolderOutlined className="drag-handle" style={{ cursor: 'grab', color: 'var(--text-tertiary)' }} />
|
|
32
|
-
<span>Performance Metrics</span>
|
|
33
|
-
</div>
|
|
34
|
-
}
|
|
35
|
-
style={{ height: '100%', display: 'flex', flexDirection: 'column' }}
|
|
36
|
-
styles={{ body: { flex: 1, padding: '16px' } }}
|
|
37
|
-
>
|
|
38
|
-
<UIRow gutter={[16, 16]} style={{ height: '100%' }}>
|
|
39
|
-
<UICol span={6}>
|
|
40
|
-
<KBStatCard
|
|
41
|
-
label="Requests"
|
|
42
|
-
value={totalRequests.toLocaleString()}
|
|
43
|
-
/>
|
|
44
|
-
</UICol>
|
|
45
|
-
<UICol span={6}>
|
|
46
|
-
<KBStatCard
|
|
47
|
-
label="Error Rate"
|
|
48
|
-
value={`${errorRate.toFixed(1)}%`}
|
|
49
|
-
variant={errorRate > 5 ? 'negative' : errorRate > 1 ? 'warning' : 'positive'}
|
|
50
|
-
/>
|
|
51
|
-
</UICol>
|
|
52
|
-
<UICol span={6}>
|
|
53
|
-
<KBStatCard
|
|
54
|
-
label="Latency (avg)"
|
|
55
|
-
value={`${avgLatency.toFixed(1)}ms`}
|
|
56
|
-
variant={avgLatency > 500 ? 'negative' : avgLatency > 200 ? 'warning' : 'positive'}
|
|
57
|
-
/>
|
|
58
|
-
</UICol>
|
|
59
|
-
<UICol span={6}>
|
|
60
|
-
<KBStatCard
|
|
61
|
-
label="Latency (p95/p99)"
|
|
62
|
-
value={`${p95.toFixed(1)}ms`}
|
|
63
|
-
variant={p95 > 1000 ? 'negative' : p95 > 500 ? 'warning' : 'positive'}
|
|
64
|
-
/>
|
|
65
|
-
</UICol>
|
|
66
|
-
</UIRow>
|
|
67
|
-
<UIRow gutter={[16, 16]} style={{ marginTop: '16px' }}>
|
|
68
|
-
<UICol span={6}>
|
|
69
|
-
<KBStatCard
|
|
70
|
-
label="Uptime"
|
|
71
|
-
value={formatUptime(uptime)}
|
|
72
|
-
variant="positive"
|
|
73
|
-
/>
|
|
74
|
-
</UICol>
|
|
75
|
-
</UIRow>
|
|
76
|
-
</UICard>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { UICard } from '@kb-labs/studio-ui-kit';
|
|
2
|
-
import { UITable } from '@kb-labs/studio-ui-kit';
|
|
3
|
-
import { HolderOutlined } from '@ant-design/icons';
|
|
4
|
-
import { usePrometheusMetrics } from '@kb-labs/studio-data-client';
|
|
5
|
-
import { useDataSources } from '../../../providers/data-sources-provider';
|
|
6
|
-
|
|
7
|
-
export function DashboardPluginsWidget() {
|
|
8
|
-
const sources = useDataSources();
|
|
9
|
-
const { data: metrics } = usePrometheusMetrics(sources.observability);
|
|
10
|
-
|
|
11
|
-
const columns = [
|
|
12
|
-
{
|
|
13
|
-
title: 'Plugin',
|
|
14
|
-
dataIndex: 'pluginId',
|
|
15
|
-
key: 'pluginId',
|
|
16
|
-
render: (text: string) => text || 'unknown',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: 'Requests',
|
|
20
|
-
dataIndex: 'total',
|
|
21
|
-
key: 'total',
|
|
22
|
-
sorter: (a: any, b: any) => a.total - b.total,
|
|
23
|
-
defaultSortOrder: 'descend' as const,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: 'Avg (ms)',
|
|
27
|
-
dataIndex: 'avgDuration',
|
|
28
|
-
key: 'avgDuration',
|
|
29
|
-
render: (value: number) => value.toFixed(0),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
title: 'Max (ms)',
|
|
33
|
-
dataIndex: 'maxDuration',
|
|
34
|
-
key: 'maxDuration',
|
|
35
|
-
render: (value: number) => value.toFixed(0),
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
const dataSource = metrics?.perPlugin?.map((plugin, index) => ({
|
|
40
|
-
key: plugin.pluginId || `plugin-${index}`,
|
|
41
|
-
pluginId: plugin.pluginId,
|
|
42
|
-
total: plugin.requests,
|
|
43
|
-
avgDuration: plugin.latency.average,
|
|
44
|
-
maxDuration: plugin.latency.max,
|
|
45
|
-
})) ?? [];
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<UICard
|
|
49
|
-
title={
|
|
50
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
51
|
-
<HolderOutlined className="drag-handle" style={{ cursor: 'grab', color: 'var(--text-tertiary)' }} />
|
|
52
|
-
<span>Plugin Performance</span>
|
|
53
|
-
</div>
|
|
54
|
-
}
|
|
55
|
-
style={{ height: '100%', display: 'flex', flexDirection: 'column' }}
|
|
56
|
-
styles={{ body: { flex: 1, padding: '16px', overflow: 'auto' } }}
|
|
57
|
-
>
|
|
58
|
-
<UITable
|
|
59
|
-
columns={columns}
|
|
60
|
-
dataSource={dataSource}
|
|
61
|
-
pagination={false}
|
|
62
|
-
size="small"
|
|
63
|
-
/>
|
|
64
|
-
|
|
65
|
-
</UICard>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { HolderOutlined } from '@ant-design/icons';
|
|
2
|
-
import { UILineChart } from '@kb-labs/studio-ui-kit';
|
|
3
|
-
import { useHealthStatus } from '@kb-labs/studio-data-client';
|
|
4
|
-
import { useDataSources } from '../../../providers/data-sources-provider';
|
|
5
|
-
import { UISpin } from '@kb-labs/studio-ui-kit';
|
|
6
|
-
import { UICard } from '@kb-labs/studio-ui-kit';
|
|
7
|
-
|
|
8
|
-
export function DashboardRequestsWidget() {
|
|
9
|
-
const sources = useDataSources();
|
|
10
|
-
const { data: health, isLoading: loading } = useHealthStatus(sources.system);
|
|
11
|
-
|
|
12
|
-
const chartData = (health?.snapshot?.topOperations ?? [])
|
|
13
|
-
.slice(0, 10)
|
|
14
|
-
.map((item) => ({
|
|
15
|
-
route: item.operation.replace(/^http\./, ''),
|
|
16
|
-
requests: item.count ?? 0,
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
const config = {
|
|
20
|
-
data: chartData,
|
|
21
|
-
xField: 'route',
|
|
22
|
-
yField: 'requests',
|
|
23
|
-
smooth: true,
|
|
24
|
-
height: 250,
|
|
25
|
-
autoFit: true,
|
|
26
|
-
point: {
|
|
27
|
-
size: 5,
|
|
28
|
-
shape: 'circle',
|
|
29
|
-
},
|
|
30
|
-
tooltip: {
|
|
31
|
-
showCrosshairs: true,
|
|
32
|
-
shared: true,
|
|
33
|
-
},
|
|
34
|
-
animation: {
|
|
35
|
-
appear: {
|
|
36
|
-
animation: 'path-in',
|
|
37
|
-
duration: 1000,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<UICard
|
|
44
|
-
title={
|
|
45
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
46
|
-
<HolderOutlined className="drag-handle" style={{ cursor: 'grab', color: 'var(--text-tertiary)' }} />
|
|
47
|
-
<span>Top Operations</span>
|
|
48
|
-
{loading && <UISpin size="small" />}
|
|
49
|
-
</div>
|
|
50
|
-
}
|
|
51
|
-
style={{ height: '100%' }}
|
|
52
|
-
>
|
|
53
|
-
{chartData.length > 0 ? (
|
|
54
|
-
<UILineChart {...config} />
|
|
55
|
-
) : (
|
|
56
|
-
<div style={{ padding: '40px', textAlign: 'center', color: 'var(--text-tertiary)' }}>
|
|
57
|
-
No operation data available
|
|
58
|
-
</div>
|
|
59
|
-
)}
|
|
60
|
-
</UICard>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Outlet } from 'react-router-dom';
|
|
3
|
-
import { UIPage, UIPageHeader } from '@kb-labs/studio-ui-kit';
|
|
4
|
-
|
|
5
|
-
export function DashboardLayout() {
|
|
6
|
-
return (
|
|
7
|
-
<UIPage width="full">
|
|
8
|
-
<UIPageHeader
|
|
9
|
-
title="Intelligence Dashboard"
|
|
10
|
-
description="Real-time platform observability and performance analytics"
|
|
11
|
-
/>
|
|
12
|
-
|
|
13
|
-
<Outlet />
|
|
14
|
-
</UIPage>
|
|
15
|
-
);
|
|
16
|
-
}
|