@auxiora/dashboard 1.0.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/router.d.ts.map +1 -1
  2. package/dist/router.js +195 -49
  3. package/dist/router.js.map +1 -1
  4. package/dist/types.d.ts +66 -0
  5. package/dist/types.d.ts.map +1 -1
  6. package/dist/types.js.map +1 -1
  7. package/package.json +10 -4
  8. package/dist-ui/assets/index-BfY0i5jw.css +0 -1
  9. package/dist-ui/assets/index-CXpk9mvw.js +0 -60
  10. package/dist-ui/icon.svg +0 -59
  11. package/dist-ui/index.html +0 -20
  12. package/src/auth.ts +0 -83
  13. package/src/cloud-types.ts +0 -63
  14. package/src/index.ts +0 -5
  15. package/src/router.ts +0 -2494
  16. package/src/types.ts +0 -269
  17. package/tests/auth.test.ts +0 -51
  18. package/tests/cloud-router.test.ts +0 -249
  19. package/tests/desktop-router.test.ts +0 -151
  20. package/tests/router.test.ts +0 -388
  21. package/tests/trust-router.test.ts +0 -170
  22. package/tsconfig.json +0 -12
  23. package/tsconfig.tsbuildinfo +0 -1
  24. package/ui/index.html +0 -19
  25. package/ui/node_modules/.bin/browserslist +0 -17
  26. package/ui/node_modules/.bin/tsc +0 -17
  27. package/ui/node_modules/.bin/tsserver +0 -17
  28. package/ui/node_modules/.bin/vite +0 -17
  29. package/ui/package.json +0 -23
  30. package/ui/public/icon.svg +0 -59
  31. package/ui/src/App.tsx +0 -63
  32. package/ui/src/api.ts +0 -238
  33. package/ui/src/components/ActivityFeed.tsx +0 -123
  34. package/ui/src/components/BehaviorHealth.tsx +0 -105
  35. package/ui/src/components/DataTable.tsx +0 -39
  36. package/ui/src/components/Layout.tsx +0 -160
  37. package/ui/src/components/PasswordStrength.tsx +0 -31
  38. package/ui/src/components/SetupProgress.tsx +0 -26
  39. package/ui/src/components/StatusBadge.tsx +0 -12
  40. package/ui/src/components/ThemeSelector.tsx +0 -39
  41. package/ui/src/contexts/ThemeContext.tsx +0 -58
  42. package/ui/src/hooks/useApi.ts +0 -19
  43. package/ui/src/hooks/usePolling.ts +0 -8
  44. package/ui/src/main.tsx +0 -16
  45. package/ui/src/pages/AuditLog.tsx +0 -36
  46. package/ui/src/pages/Behaviors.tsx +0 -426
  47. package/ui/src/pages/Chat.tsx +0 -688
  48. package/ui/src/pages/Login.tsx +0 -64
  49. package/ui/src/pages/Overview.tsx +0 -56
  50. package/ui/src/pages/Sessions.tsx +0 -26
  51. package/ui/src/pages/SettingsAmbient.tsx +0 -185
  52. package/ui/src/pages/SettingsConnections.tsx +0 -201
  53. package/ui/src/pages/SettingsNotifications.tsx +0 -241
  54. package/ui/src/pages/SetupAppearance.tsx +0 -45
  55. package/ui/src/pages/SetupChannels.tsx +0 -143
  56. package/ui/src/pages/SetupComplete.tsx +0 -31
  57. package/ui/src/pages/SetupConnections.tsx +0 -80
  58. package/ui/src/pages/SetupDashboardPassword.tsx +0 -50
  59. package/ui/src/pages/SetupIdentity.tsx +0 -68
  60. package/ui/src/pages/SetupPersonality.tsx +0 -78
  61. package/ui/src/pages/SetupProvider.tsx +0 -65
  62. package/ui/src/pages/SetupVault.tsx +0 -50
  63. package/ui/src/pages/SetupWelcome.tsx +0 -19
  64. package/ui/src/pages/UnlockVault.tsx +0 -56
  65. package/ui/src/pages/Webhooks.tsx +0 -158
  66. package/ui/src/pages/settings/Appearance.tsx +0 -63
  67. package/ui/src/pages/settings/Channels.tsx +0 -138
  68. package/ui/src/pages/settings/Identity.tsx +0 -61
  69. package/ui/src/pages/settings/Personality.tsx +0 -54
  70. package/ui/src/pages/settings/PersonalityEditor.tsx +0 -577
  71. package/ui/src/pages/settings/Provider.tsx +0 -537
  72. package/ui/src/pages/settings/Security.tsx +0 -111
  73. package/ui/src/styles/global.css +0 -2308
  74. package/ui/src/styles/themes/index.css +0 -7
  75. package/ui/src/styles/themes/monolith.css +0 -125
  76. package/ui/src/styles/themes/nebula.css +0 -90
  77. package/ui/src/styles/themes/neon.css +0 -149
  78. package/ui/src/styles/themes/polar.css +0 -151
  79. package/ui/src/styles/themes/signal.css +0 -163
  80. package/ui/src/styles/themes/terra.css +0 -146
  81. package/ui/tsconfig.json +0 -14
  82. package/ui/vite.config.ts +0 -20
package/dist-ui/icon.svg DELETED
@@ -1,59 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
2
- <!-- Background -->
3
- <circle cx="64" cy="64" r="62" fill="#0f0f1a"/>
4
-
5
- <!-- Shield outline -->
6
- <path d="M64 12 L104 32 L104 62 C104 90 84 110 64 118 C44 110 24 90 24 62 L24 32 Z"
7
- fill="none" stroke="#6366f1" stroke-width="4" stroke-linejoin="round"/>
8
-
9
- <!-- Shield fill with gradient -->
10
- <defs>
11
- <linearGradient id="sg" x1="0" y1="0" x2="0" y2="1">
12
- <stop offset="0%" stop-color="#6366f1" stop-opacity="0.25"/>
13
- <stop offset="100%" stop-color="#6366f1" stop-opacity="0.05"/>
14
- </linearGradient>
15
- </defs>
16
- <path d="M64 16 L100 34 L100 62 C100 88 82 106 64 114 C46 106 28 88 28 62 L28 34 Z"
17
- fill="url(#sg)"/>
18
-
19
- <!-- Neural network nodes -->
20
- <!-- Center node (brain core) -->
21
- <circle cx="64" cy="58" r="6" fill="#818cf8"/>
22
- <!-- Top nodes -->
23
- <circle cx="50" cy="40" r="4" fill="#22c55e"/>
24
- <circle cx="78" cy="40" r="4" fill="#22c55e"/>
25
- <!-- Mid nodes -->
26
- <circle cx="42" cy="62" r="3.5" fill="#818cf8" opacity="0.8"/>
27
- <circle cx="86" cy="62" r="3.5" fill="#818cf8" opacity="0.8"/>
28
- <!-- Bottom nodes -->
29
- <circle cx="52" cy="82" r="3.5" fill="#22c55e" opacity="0.8"/>
30
- <circle cx="76" cy="82" r="3.5" fill="#22c55e" opacity="0.8"/>
31
- <!-- Bottom center -->
32
- <circle cx="64" cy="94" r="3" fill="#818cf8" opacity="0.6"/>
33
-
34
- <!-- Neural connections -->
35
- <g stroke="#818cf8" stroke-width="1.5" opacity="0.5">
36
- <!-- Center to top -->
37
- <line x1="64" y1="58" x2="50" y2="40"/>
38
- <line x1="64" y1="58" x2="78" y2="40"/>
39
- <!-- Center to mid -->
40
- <line x1="64" y1="58" x2="42" y2="62"/>
41
- <line x1="64" y1="58" x2="86" y2="62"/>
42
- <!-- Center to bottom -->
43
- <line x1="64" y1="58" x2="52" y2="82"/>
44
- <line x1="64" y1="58" x2="76" y2="82"/>
45
- <!-- Cross connections -->
46
- <line x1="50" y1="40" x2="42" y2="62"/>
47
- <line x1="78" y1="40" x2="86" y2="62"/>
48
- <line x1="42" y1="62" x2="52" y2="82"/>
49
- <line x1="86" y1="62" x2="76" y2="82"/>
50
- <!-- Top cross -->
51
- <line x1="50" y1="40" x2="78" y2="40"/>
52
- <!-- Bottom to center bottom -->
53
- <line x1="52" y1="82" x2="64" y2="94"/>
54
- <line x1="76" y1="82" x2="64" y2="94"/>
55
- </g>
56
-
57
- <!-- Glow on center node -->
58
- <circle cx="64" cy="58" r="10" fill="#6366f1" opacity="0.15"/>
59
- </svg>
@@ -1,20 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Auxiora Dashboard</title>
7
- <link rel="icon" href="/dashboard/icon.svg" type="image/svg+xml">
8
- <script type="module" crossorigin src="/dashboard/assets/index-CXpk9mvw.js"></script>
9
- <link rel="stylesheet" crossorigin href="/dashboard/assets/index-BfY0i5jw.css">
10
- </head>
11
- <body>
12
- <div id="root"></div>
13
- <script>
14
- (function() {
15
- var t = localStorage.getItem('auxiora-theme');
16
- if (t) document.documentElement.setAttribute('data-theme', t);
17
- })();
18
- </script>
19
- </body>
20
- </html>
package/src/auth.ts DELETED
@@ -1,83 +0,0 @@
1
- import * as crypto from 'node:crypto';
2
- import { getLogger } from '@auxiora/logger';
3
- import type { DashboardSession } from './types.js';
4
- import { MAX_LOGIN_ATTEMPTS, LOGIN_WINDOW_MS } from './types.js';
5
-
6
- const logger = getLogger('dashboard:auth');
7
-
8
- export class DashboardAuth {
9
- private sessions = new Map<string, DashboardSession>();
10
- private sessionTtlMs: number;
11
- private loginAttempts = new Map<string, { count: number; windowStart: number }>();
12
-
13
- constructor(sessionTtlMs: number) {
14
- this.sessionTtlMs = sessionTtlMs;
15
- }
16
-
17
- isRateLimited(ip: string): boolean {
18
- const now = Date.now();
19
- const entry = this.loginAttempts.get(ip);
20
-
21
- if (!entry) return false;
22
-
23
- if (now - entry.windowStart > LOGIN_WINDOW_MS) {
24
- this.loginAttempts.delete(ip);
25
- return false;
26
- }
27
-
28
- return entry.count >= MAX_LOGIN_ATTEMPTS;
29
- }
30
-
31
- recordAttempt(ip: string): void {
32
- const now = Date.now();
33
- const entry = this.loginAttempts.get(ip);
34
-
35
- if (!entry || now - entry.windowStart > LOGIN_WINDOW_MS) {
36
- this.loginAttempts.set(ip, { count: 1, windowStart: now });
37
- } else {
38
- entry.count++;
39
- }
40
- }
41
-
42
- createSession(ip: string): string {
43
- const id = crypto.randomUUID();
44
- const now = Date.now();
45
-
46
- this.sessions.set(id, {
47
- id,
48
- createdAt: now,
49
- lastActive: now,
50
- ip,
51
- });
52
-
53
- logger.info('Dashboard session created', { sessionId: id });
54
- return id;
55
- }
56
-
57
- validateSession(sessionId: string): boolean {
58
- const session = this.sessions.get(sessionId);
59
- if (!session) return false;
60
-
61
- const now = Date.now();
62
- if (now - session.lastActive > this.sessionTtlMs) {
63
- this.sessions.delete(sessionId);
64
- return false;
65
- }
66
-
67
- session.lastActive = now;
68
- return true;
69
- }
70
-
71
- destroySession(sessionId: string): boolean {
72
- return this.sessions.delete(sessionId);
73
- }
74
-
75
- cleanup(): void {
76
- const now = Date.now();
77
- for (const [id, session] of this.sessions) {
78
- if (now - session.lastActive > this.sessionTtlMs) {
79
- this.sessions.delete(id);
80
- }
81
- }
82
- }
83
- }
@@ -1,63 +0,0 @@
1
- /** Cloud signup request body */
2
- export interface CloudSignupRequest {
3
- email: string;
4
- name: string;
5
- password: string;
6
- plan?: string;
7
- }
8
-
9
- /** Cloud login request body */
10
- export interface CloudLoginRequest {
11
- email: string;
12
- password: string;
13
- }
14
-
15
- /** Cloud tenant plan change request */
16
- export interface CloudPlanChangeRequest {
17
- plan: string;
18
- }
19
-
20
- /** Cloud payment method request */
21
- export interface CloudPaymentMethodRequest {
22
- token: string;
23
- }
24
-
25
- /** Cloud tenant response */
26
- export interface CloudTenantResponse {
27
- id: string;
28
- name: string;
29
- email: string;
30
- plan: string;
31
- status: string;
32
- createdAt: string;
33
- }
34
-
35
- /** Cloud usage response */
36
- export interface CloudUsageResponse {
37
- usage: Record<string, number>;
38
- quotas: Record<string, number>;
39
- }
40
-
41
- /** Cloud billing response */
42
- export interface CloudBillingResponse {
43
- plan: string;
44
- invoices: Array<{
45
- id: string;
46
- amount: number;
47
- status: string;
48
- created: string;
49
- }>;
50
- }
51
-
52
- /** Cloud dependency interface for the dashboard router */
53
- export interface CloudDeps {
54
- signup(email: string, name: string, password: string, plan?: string): Promise<{ tenantId: string; token: string }>;
55
- login(email: string, password: string): Promise<{ tenantId: string; token: string } | null>;
56
- getTenant(tenantId: string): Promise<CloudTenantResponse | null>;
57
- changePlan(tenantId: string, plan: string): Promise<{ success: boolean }>;
58
- getUsage(tenantId: string): Promise<CloudUsageResponse>;
59
- getBilling(tenantId: string): Promise<CloudBillingResponse>;
60
- addPaymentMethod(tenantId: string, token: string): Promise<{ success: boolean }>;
61
- exportData(tenantId: string): Promise<{ downloadUrl: string }>;
62
- deleteTenant(tenantId: string): Promise<{ success: boolean }>;
63
- }
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- export type { DashboardConfig, DashboardSession, DashboardDeps, SetupDeps, PersonalityTemplateSummary } from './types.js';
2
- export { DEFAULT_DASHBOARD_CONFIG } from './types.js';
3
- export { DashboardAuth } from './auth.js';
4
- export { createDashboardRouter, type DashboardRouterOptions } from './router.js';
5
- export type { CloudDeps, CloudSignupRequest, CloudLoginRequest, CloudTenantResponse, CloudUsageResponse, CloudBillingResponse } from './cloud-types.js';