@builderos/create-agent-os 0.0.2
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 +39 -0
- package/bin/cli.js +133 -0
- package/package.json +40 -0
- package/src/template/App.tsx +68 -0
- package/src/template/agent-os/commands/create-tasks/1-get-spec-requirements.md +19 -0
- package/src/template/agent-os/commands/create-tasks/2-create-tasks-list.md +234 -0
- package/src/template/agent-os/commands/create-tasks/create-tasks.md +254 -0
- package/src/template/agent-os/commands/design-screen/design-screen.md +32 -0
- package/src/template/agent-os/commands/design-shell/design-shell.md +34 -0
- package/src/template/agent-os/commands/design-tokens/design-tokens.md +36 -0
- package/src/template/agent-os/commands/export-product/export-product.md +44 -0
- package/src/template/agent-os/commands/implement-tasks/1-determine-tasks.md +13 -0
- package/src/template/agent-os/commands/implement-tasks/2-implement-tasks.md +63 -0
- package/src/template/agent-os/commands/implement-tasks/3-verify-implementation.md +113 -0
- package/src/template/agent-os/commands/implement-tasks/implement-tasks.md +207 -0
- package/src/template/agent-os/commands/initialize-design/initialize-design.md +54 -0
- package/src/template/agent-os/commands/orchestrate-tasks/orchestrate-tasks.md +180 -0
- package/src/template/agent-os/commands/plan-product/1-product-concept.md +53 -0
- package/src/template/agent-os/commands/plan-product/2-create-mission.md +78 -0
- package/src/template/agent-os/commands/plan-product/3-create-roadmap.md +73 -0
- package/src/template/agent-os/commands/plan-product/4-create-tech-stack.md +46 -0
- package/src/template/agent-os/commands/plan-product/plan-product.md +241 -0
- package/src/template/agent-os/commands/sample-data/sample-data.md +51 -0
- package/src/template/agent-os/commands/scaffold-implementation/scaffold-implementation.md +36 -0
- package/src/template/agent-os/commands/screenshot-design/screenshot-design.md +21 -0
- package/src/template/agent-os/commands/shape-spec/1-initialize-spec.md +95 -0
- package/src/template/agent-os/commands/shape-spec/2-shape-spec.md +300 -0
- package/src/template/agent-os/commands/shape-spec/shape-spec.md +40 -0
- package/src/template/agent-os/commands/write-spec/write-spec.md +134 -0
- package/src/template/agent-os/config.yml +13 -0
- package/src/template/agent-os/product/mission.md +29 -0
- package/src/template/agent-os/product/roadmap.md +9 -0
- package/src/template/agent-os/product/tech-stack.md +14 -0
- package/src/template/agent-os/specs/README.md +1 -0
- package/src/template/agent-os/standards/backend/api.md +10 -0
- package/src/template/agent-os/standards/backend/migrations.md +9 -0
- package/src/template/agent-os/standards/backend/models.md +10 -0
- package/src/template/agent-os/standards/backend/queries.md +9 -0
- package/src/template/agent-os/standards/frontend/accessibility.md +10 -0
- package/src/template/agent-os/standards/frontend/components.md +11 -0
- package/src/template/agent-os/standards/frontend/css.md +7 -0
- package/src/template/agent-os/standards/frontend/responsive.md +11 -0
- package/src/template/agent-os/standards/global/coding-style.md +10 -0
- package/src/template/agent-os/standards/global/commenting.md +5 -0
- package/src/template/agent-os/standards/global/conventions.md +11 -0
- package/src/template/agent-os/standards/global/error-handling.md +9 -0
- package/src/template/agent-os/standards/global/tech-stack.md +31 -0
- package/src/template/agent-os/standards/global/validation.md +11 -0
- package/src/template/agent-os/standards/testing/test-writing.md +9 -0
- package/src/template/agent-os-ui/README.md +73 -0
- package/src/template/agent-os-ui/package-lock.json +5028 -0
- package/src/template/agent-os-ui/package.json +52 -0
- package/src/template/agent-os-ui/postcss.config.js +6 -0
- package/src/template/agent-os-ui/src/components/AgentShell.tsx +31 -0
- package/src/template/agent-os-ui/src/components/AgentSidebar.tsx +65 -0
- package/src/template/agent-os-ui/src/components/GuidanceCard.tsx +75 -0
- package/src/template/agent-os-ui/src/components/MarkdownViewer.tsx +25 -0
- package/src/template/agent-os-ui/src/components/PromptButton.tsx +28 -0
- package/src/template/agent-os-ui/src/components/StatusItem.tsx +45 -0
- package/src/template/agent-os-ui/src/components/ThemeToggle.tsx +72 -0
- package/src/template/agent-os-ui/src/index.ts +11 -0
- package/src/template/agent-os-ui/src/style.css +3 -0
- package/src/template/agent-os-ui/tailwind.config.js +50 -0
- package/src/template/agent-os-ui/tsconfig.json +33 -0
- package/src/template/agent-os-ui/vite.config.ts +32 -0
- package/src/template/control-center/backend/backend.log +2 -0
- package/src/template/control-center/backend/index.js +228 -0
- package/src/template/control-center/backend/package-lock.json +951 -0
- package/src/template/control-center/backend/package.json +19 -0
- package/src/template/control-center/frontend/README.md +73 -0
- package/src/template/control-center/frontend/eslint.config.js +23 -0
- package/src/template/control-center/frontend/index.html +21 -0
- package/src/template/control-center/frontend/package-lock.json +5752 -0
- package/src/template/control-center/frontend/package.json +42 -0
- package/src/template/control-center/frontend/public/runtime-config.json +11 -0
- package/src/template/control-center/frontend/public/vite.svg +1 -0
- package/src/template/control-center/frontend/src/App.css +42 -0
- package/src/template/control-center/frontend/src/App.tsx +738 -0
- package/src/template/control-center/frontend/src/assets/react.svg +1 -0
- package/src/template/control-center/frontend/src/components/ThemeToggle.tsx +64 -0
- package/src/template/control-center/frontend/src/components/ui/ToastContext.tsx +81 -0
- package/src/template/control-center/frontend/src/index.css +194 -0
- package/src/template/control-center/frontend/src/main.tsx +14 -0
- package/src/template/control-center/frontend/src/vite-env.d.ts +1 -0
- package/src/template/control-center/frontend/tsconfig.app.json +28 -0
- package/src/template/control-center/frontend/tsconfig.json +7 -0
- package/src/template/control-center/frontend/tsconfig.node.json +26 -0
- package/src/template/control-center/frontend/vite.config.ts +22 -0
- package/src/template/design/.claude/commands/design-os/data-model.md +122 -0
- package/src/template/design/.claude/commands/design-os/design-screen.md +309 -0
- package/src/template/design/.claude/commands/design-os/design-shell.md +238 -0
- package/src/template/design/.claude/commands/design-os/design-tokens.md +166 -0
- package/src/template/design/.claude/commands/design-os/export-product.md +1105 -0
- package/src/template/design/.claude/commands/design-os/product-roadmap.md +121 -0
- package/src/template/design/.claude/commands/design-os/product-vision.md +99 -0
- package/src/template/design/.claude/commands/design-os/sample-data.md +263 -0
- package/src/template/design/.claude/commands/design-os/screenshot-design.md +112 -0
- package/src/template/design/.claude/commands/design-os/shape-section.md +138 -0
- package/src/template/design/.claude/skills/frontend-design/SKILL.md +42 -0
- package/src/template/design/.github/CODE_OF_CONDUCT.md +5 -0
- package/src/template/design/.github/CONTRIBUTING.md +51 -0
- package/src/template/design/.github/ISSUE_TEMPLATE/config.yml +22 -0
- package/src/template/design/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/src/template/design/.github/SECURITY.yml +5 -0
- package/src/template/design/.github/SUPPORT.md +19 -0
- package/src/template/design/.github/workflows/pr-decline.yml +135 -0
- package/src/template/design/.github/workflows/stale.yml +25 -0
- package/src/template/design/CHANGELOG.md +13 -0
- package/src/template/design/LICENSE +21 -0
- package/src/template/design/README.md +54 -0
- package/src/template/design/agents.md +218 -0
- package/src/template/design/claude.md +1 -0
- package/src/template/design/components.json +22 -0
- package/src/template/design/docs/codebase-implementation.md +153 -0
- package/src/template/design/docs/design-section.md +135 -0
- package/src/template/design/docs/export.md +149 -0
- package/src/template/design/docs/getting-started.md +59 -0
- package/src/template/design/docs/index.md +56 -0
- package/src/template/design/docs/product-planning.md +113 -0
- package/src/template/design/docs/requirements.md +22 -0
- package/src/template/design/docs/usage.md +62 -0
- package/src/template/design/eslint.config.js +23 -0
- package/src/template/design/index.html +21 -0
- package/src/template/design/package-lock.json +5473 -0
- package/src/template/design/package.json +47 -0
- package/src/template/design/product-plan.zip +0 -0
- package/src/template/design/public/vite.svg +1 -0
- package/src/template/design/src/assets/react.svg +1 -0
- package/src/template/design/src/components/AppLayout.tsx +95 -0
- package/src/template/design/src/components/DataCard.tsx +139 -0
- package/src/template/design/src/components/DataModelPage.tsx +120 -0
- package/src/template/design/src/components/DesignPage.tsx +284 -0
- package/src/template/design/src/components/EmptyState.tsx +155 -0
- package/src/template/design/src/components/ExportPage.tsx +344 -0
- package/src/template/design/src/components/NextPhaseButton.tsx +33 -0
- package/src/template/design/src/components/PhaseNav.tsx +152 -0
- package/src/template/design/src/components/PhaseWarningBanner.tsx +81 -0
- package/src/template/design/src/components/ProductOverviewCard.tsx +102 -0
- package/src/template/design/src/components/ProductPage.tsx +97 -0
- package/src/template/design/src/components/ScreenDesignPage.tsx +370 -0
- package/src/template/design/src/components/ScreenDesignsCard.tsx +49 -0
- package/src/template/design/src/components/SectionPage.tsx +256 -0
- package/src/template/design/src/components/SectionsCard.tsx +47 -0
- package/src/template/design/src/components/SectionsPage.tsx +181 -0
- package/src/template/design/src/components/ShellCard.tsx +85 -0
- package/src/template/design/src/components/ShellDesignPage.tsx +242 -0
- package/src/template/design/src/components/SpecCard.tsx +121 -0
- package/src/template/design/src/components/StepIndicator.tsx +75 -0
- package/src/template/design/src/components/ThemeToggle.tsx +86 -0
- package/src/template/design/src/components/ui/ToastContext.tsx +81 -0
- package/src/template/design/src/components/ui/avatar.tsx +53 -0
- package/src/template/design/src/components/ui/badge.tsx +46 -0
- package/src/template/design/src/components/ui/button.tsx +60 -0
- package/src/template/design/src/components/ui/card.tsx +92 -0
- package/src/template/design/src/components/ui/collapsible.tsx +48 -0
- package/src/template/design/src/components/ui/dialog.tsx +143 -0
- package/src/template/design/src/components/ui/dropdown-menu.tsx +255 -0
- package/src/template/design/src/components/ui/input.tsx +21 -0
- package/src/template/design/src/components/ui/label.tsx +22 -0
- package/src/template/design/src/components/ui/progress.tsx +24 -0
- package/src/template/design/src/components/ui/scroll-area.tsx +18 -0
- package/src/template/design/src/components/ui/select.tsx +67 -0
- package/src/template/design/src/components/ui/separator.tsx +28 -0
- package/src/template/design/src/components/ui/sheet.tsx +137 -0
- package/src/template/design/src/components/ui/skeleton.tsx +13 -0
- package/src/template/design/src/components/ui/switch.tsx +46 -0
- package/src/template/design/src/components/ui/table.tsx +116 -0
- package/src/template/design/src/components/ui/tabs.tsx +64 -0
- package/src/template/design/src/index.css +284 -0
- package/src/template/design/src/lib/data-model-loader.ts +91 -0
- package/src/template/design/src/lib/design-system-loader.ts +101 -0
- package/src/template/design/src/lib/product-loader.ts +221 -0
- package/src/template/design/src/lib/router.tsx +52 -0
- package/src/template/design/src/lib/section-loader.ts +272 -0
- package/src/template/design/src/lib/shell-loader.ts +175 -0
- package/src/template/design/src/lib/utils.ts +6 -0
- package/src/template/design/src/main.tsx +15 -0
- package/src/template/design/src/sections/.gitkeep +0 -0
- package/src/template/design/src/sections/ai-orchestration-engine-oai/OrchestrationEngine.tsx +348 -0
- package/src/template/design/src/sections/core-platform-shell/AppShell.tsx +403 -0
- package/src/template/design/src/sections/gemini-live-integration/GeminiIntegration.tsx +332 -0
- package/src/template/design/src/sections/interactive-2d-canvas/WhiteboardCanvas.tsx +334 -0
- package/src/template/design/src/sections/participation-equity-tracker/EquityTracker.tsx +383 -0
- package/src/template/design/src/sections/persistent-memory-system/PersistentMemory.tsx +308 -0
- package/src/template/design/src/sections/real-time-communication-layer/VideoSession.tsx +342 -0
- package/src/template/design/src/sections/visual-intelligence-agents/VisualAgents.tsx +311 -0
- package/src/template/design/src/types/product.ts +97 -0
- package/src/template/design/src/types/section.ts +33 -0
- package/src/template/design/tsconfig.app.json +34 -0
- package/src/template/design/tsconfig.json +13 -0
- package/src/template/design/tsconfig.node.json +26 -0
- package/src/template/design/vite.config.ts +18 -0
- package/src/template/package.json +27 -0
- package/src/template/vite.config.ts +16 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Activity,
|
|
4
|
+
BrainCircuit,
|
|
5
|
+
MessageSquare,
|
|
6
|
+
AlertTriangle,
|
|
7
|
+
CheckCircle2,
|
|
8
|
+
XCircle,
|
|
9
|
+
Play,
|
|
10
|
+
Pause,
|
|
11
|
+
RefreshCw,
|
|
12
|
+
ChevronRight,
|
|
13
|
+
Terminal,
|
|
14
|
+
Zap
|
|
15
|
+
} from 'lucide-react';
|
|
16
|
+
import { Button } from '@/components/ui/button';
|
|
17
|
+
import { Card, CardHeader, CardTitle, CardContent, CardDescription, CardFooter } from '@/components/ui/card';
|
|
18
|
+
import { Badge } from '@/components/ui/badge';
|
|
19
|
+
import { ScrollArea } from '@/components/ui/scroll-area';
|
|
20
|
+
import { Separator } from '@/components/ui/separator';
|
|
21
|
+
import { cn } from '@/lib/utils';
|
|
22
|
+
|
|
23
|
+
// Mock Data Types
|
|
24
|
+
interface Node {
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
type: 'input' | 'process' | 'decision' | 'output';
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
status: 'pending' | 'active' | 'processed';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface Edge {
|
|
34
|
+
source: string;
|
|
35
|
+
target: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface Log {
|
|
40
|
+
id: string;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
level: 'info' | 'warning' | 'error' | 'success';
|
|
43
|
+
message: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface Intervention {
|
|
47
|
+
type: string;
|
|
48
|
+
content: string;
|
|
49
|
+
confidence: number;
|
|
50
|
+
rationale: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const MOCK_DATA = {
|
|
54
|
+
"graph": {
|
|
55
|
+
"nodes": [
|
|
56
|
+
{ "id": "observe", "label": "Observe", "type": "input", "x": 100, "y": 200, "status": "active" },
|
|
57
|
+
{ "id": "analyze", "label": "Analyze Bias", "type": "process", "x": 300, "y": 120, "status": "processed" },
|
|
58
|
+
{ "id": "detect_groan", "label": "Detect Groan Zone", "type": "process", "x": 300, "y": 280, "status": "processed" },
|
|
59
|
+
{ "id": "assessment", "label": "Assess Intervention", "type": "decision", "x": 550, "y": 200, "status": "active" },
|
|
60
|
+
{ "id": "formulate", "label": "Formulate Prompt", "type": "process", "x": 800, "y": 200, "status": "pending" },
|
|
61
|
+
{ "id": "act", "label": "Intervene", "type": "output", "x": 1000, "y": 200, "status": "pending" }
|
|
62
|
+
] as Node[],
|
|
63
|
+
"edges": [
|
|
64
|
+
{ "source": "observe", "target": "analyze" },
|
|
65
|
+
{ "source": "observe", "target": "detect_groan" },
|
|
66
|
+
{ "source": "analyze", "target": "assessment" },
|
|
67
|
+
{ "source": "detect_groan", "target": "assessment" },
|
|
68
|
+
{ "source": "assessment", "target": "formulate", "label": "threshold_met" },
|
|
69
|
+
{ "source": "formulate", "target": "act" }
|
|
70
|
+
] as Edge[]
|
|
71
|
+
},
|
|
72
|
+
"logs": [
|
|
73
|
+
{
|
|
74
|
+
"id": "log_1",
|
|
75
|
+
"timestamp": "2023-11-20T14:15:22Z",
|
|
76
|
+
"level": "info",
|
|
77
|
+
"message": "Ingesting audio stream: 15s silence detected from 'Remote Participants'."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "log_2",
|
|
81
|
+
"timestamp": "2023-11-20T14:15:25Z",
|
|
82
|
+
"level": "warning",
|
|
83
|
+
"message": "Groan Zone Detector: Probability 85%. Circular argumentation detected in semantic analysis."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "log_3",
|
|
87
|
+
"timestamp": "2023-11-20T14:15:28Z",
|
|
88
|
+
"level": "success",
|
|
89
|
+
"message": "Transitioning to Assessment State. Checking intervention cooldown (last active: 5m ago)."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "log_4",
|
|
93
|
+
"timestamp": "2023-11-20T14:15:29Z",
|
|
94
|
+
"level": "info",
|
|
95
|
+
"message": "Evaluation: Bias metrics within acceptable range. Groan Zone impact: High."
|
|
96
|
+
}
|
|
97
|
+
] as Log[],
|
|
98
|
+
"currentIntervention": {
|
|
99
|
+
"type": "text",
|
|
100
|
+
"content": "I notice we've been circling the same point about 'timeline risks'. Would it help to map these risks on the canvas to visually distinguish them?",
|
|
101
|
+
"confidence": 0.92,
|
|
102
|
+
"rationale": "High repetition of 'risk' keywords; low participation from 2 members."
|
|
103
|
+
} as Intervention
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const GraphNode = ({ node }: { node: Node }) => {
|
|
107
|
+
const getNodeColor = (type: string, status: string) => {
|
|
108
|
+
if (status === 'active') return 'stroke-indigo-500 fill-indigo-50 dark:fill-indigo-950/50 dark:stroke-indigo-400 shadow-[0_0_15px_rgba(99,102,241,0.5)]';
|
|
109
|
+
if (status === 'processed') return 'stroke-emerald-500 fill-emerald-50 dark:fill-emerald-950/50 dark:stroke-emerald-400';
|
|
110
|
+
return 'stroke-stone-300 fill-white dark:fill-stone-900 dark:stroke-stone-700';
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const getIcon = (type: string) => {
|
|
114
|
+
switch (type) {
|
|
115
|
+
case 'input': return <BrainCircuit size={16} />;
|
|
116
|
+
case 'decision': return <Activity size={16} />;
|
|
117
|
+
case 'output': return <MessageSquare size={16} />;
|
|
118
|
+
default: return <RefreshCw size={16} />;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<g className="transition-all duration-500 select-none group cursor-pointer hover:scale-105">
|
|
124
|
+
{/* Node Shape */}
|
|
125
|
+
<rect
|
|
126
|
+
x={node.x - 70}
|
|
127
|
+
y={node.y - 30}
|
|
128
|
+
width={140}
|
|
129
|
+
height={60}
|
|
130
|
+
rx={12}
|
|
131
|
+
className={cn(
|
|
132
|
+
"stroke-2 transition-all duration-300",
|
|
133
|
+
getNodeColor(node.type, node.status)
|
|
134
|
+
)}
|
|
135
|
+
/>
|
|
136
|
+
|
|
137
|
+
{/* Active Pulse Animation */}
|
|
138
|
+
{node.status === 'active' && (
|
|
139
|
+
<rect
|
|
140
|
+
x={node.x - 70}
|
|
141
|
+
y={node.y - 30}
|
|
142
|
+
width={140}
|
|
143
|
+
height={60}
|
|
144
|
+
rx={12}
|
|
145
|
+
className="stroke-indigo-500 stroke-2 fill-none animate-ping opacity-20"
|
|
146
|
+
/>
|
|
147
|
+
)}
|
|
148
|
+
|
|
149
|
+
{/* Content */}
|
|
150
|
+
<foreignObject x={node.x - 60} y={node.y - 20} width={120} height={40}>
|
|
151
|
+
<div className="flex items-center gap-2 h-full justify-center text-xs font-medium text-stone-700 dark:text-stone-200">
|
|
152
|
+
{getIcon(node.type)}
|
|
153
|
+
<span className="truncate">{node.label}</span>
|
|
154
|
+
</div>
|
|
155
|
+
</foreignObject>
|
|
156
|
+
</g>
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const GraphEdge = ({ edge, nodes }: { edge: Edge, nodes: Node[] }) => {
|
|
161
|
+
const source = nodes.find(n => n.id === edge.source);
|
|
162
|
+
const target = nodes.find(n => n.id === edge.target);
|
|
163
|
+
|
|
164
|
+
if (!source || !target) return null;
|
|
165
|
+
|
|
166
|
+
// Simple Cubic Bezier
|
|
167
|
+
const midX = (source.x + target.x) / 2;
|
|
168
|
+
const path = `M ${source.x + 70} ${source.y} C ${midX} ${source.y}, ${midX} ${target.y}, ${target.x - 70} ${target.y}`;
|
|
169
|
+
|
|
170
|
+
const isActive = source.status === 'processed' || (source.status === 'active' && target.status === 'active');
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<g>
|
|
174
|
+
<path
|
|
175
|
+
d={path}
|
|
176
|
+
fill="none"
|
|
177
|
+
className={cn(
|
|
178
|
+
"stroke-2 transition-all duration-500",
|
|
179
|
+
isActive ? "stroke-emerald-400 dark:stroke-emerald-500" : "stroke-stone-200 dark:stroke-stone-800"
|
|
180
|
+
)}
|
|
181
|
+
/>
|
|
182
|
+
{edge.label && (
|
|
183
|
+
<foreignObject x={(source.x + target.x) / 2 - 40} y={(source.y + target.y) / 2 - 10} width={80} height={20}>
|
|
184
|
+
<div className="bg-stone-100 dark:bg-stone-800 text-[10px] text-stone-500 px-1 rounded text-center border border-stone-200 dark:border-stone-700">
|
|
185
|
+
{edge.label}
|
|
186
|
+
</div>
|
|
187
|
+
</foreignObject>
|
|
188
|
+
)}
|
|
189
|
+
</g>
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export default function OrchestrationEngine() {
|
|
194
|
+
const [activeTab, setActiveTab] = useState('logs');
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<div className="flex h-screen w-full bg-stone-50 dark:bg-stone-950 font-sans overflow-hidden">
|
|
198
|
+
|
|
199
|
+
{/* Main Graph Visualization Area */}
|
|
200
|
+
<div className="flex-1 relative flex flex-col">
|
|
201
|
+
{/* Header */}
|
|
202
|
+
<header className="h-16 border-b border-stone-200 dark:border-stone-800 bg-white dark:bg-stone-900 px-6 flex items-center justify-between shrink-0">
|
|
203
|
+
<div className="flex items-center gap-3">
|
|
204
|
+
<div className="p-2 bg-indigo-100 dark:bg-indigo-900/30 rounded-lg text-indigo-600 dark:text-indigo-400">
|
|
205
|
+
<BrainCircuit size={20} />
|
|
206
|
+
</div>
|
|
207
|
+
<div>
|
|
208
|
+
<h1 className="font-semibold text-stone-900 dark:text-stone-100">Orchestration Engine</h1>
|
|
209
|
+
<p className="text-xs text-stone-500">OAI Framework • v2.4.1</p>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<div className="flex items-center gap-3">
|
|
214
|
+
<Badge variant="outline" className="gap-1 bg-green-50 text-green-700 border-green-200 dark:bg-green-900/20 dark:text-green-400 dark:border-green-800">
|
|
215
|
+
<Play size={10} className="fill-current" /> Running
|
|
216
|
+
</Badge>
|
|
217
|
+
<div className="text-xs text-stone-400 font-mono">Latency: 24ms</div>
|
|
218
|
+
</div>
|
|
219
|
+
</header>
|
|
220
|
+
|
|
221
|
+
{/* Graph SVG Canvas */}
|
|
222
|
+
<div className="flex-1 bg-stone-50 dark:bg-stone-950 relative overflow-hidden">
|
|
223
|
+
{/* Grid Background */}
|
|
224
|
+
<div className="absolute inset-0 opacity-[0.2]"
|
|
225
|
+
style={{ backgroundImage: 'radial-gradient(#a1a1aa 1px, transparent 1px)', backgroundSize: '30px 30px' }}
|
|
226
|
+
/>
|
|
227
|
+
|
|
228
|
+
<svg className="w-full h-full">
|
|
229
|
+
{/* Edges */}
|
|
230
|
+
{MOCK_DATA.graph.edges.map((edge, i) => (
|
|
231
|
+
<GraphEdge key={i} edge={edge} nodes={MOCK_DATA.graph.nodes} />
|
|
232
|
+
))}
|
|
233
|
+
{/* Nodes */}
|
|
234
|
+
{MOCK_DATA.graph.nodes.map(node => (
|
|
235
|
+
<GraphNode key={node.id} node={node} />
|
|
236
|
+
))}
|
|
237
|
+
</svg>
|
|
238
|
+
|
|
239
|
+
{/* Floating Overlay Stats */}
|
|
240
|
+
<div className="absolute bottom-6 left-6 grid gap-4">
|
|
241
|
+
<Card className="w-64 bg-white/90 dark:bg-stone-900/90 backdrop-blur shadow-sm">
|
|
242
|
+
<CardHeader className="py-3">
|
|
243
|
+
<CardTitle className="text-xs uppercase tracking-wider text-stone-500">Active State</CardTitle>
|
|
244
|
+
</CardHeader>
|
|
245
|
+
<CardContent className="py-2 pb-4">
|
|
246
|
+
<div className="flex items-center gap-2">
|
|
247
|
+
<Activity className="text-indigo-500 animate-pulse" size={18} />
|
|
248
|
+
<span className="font-medium">Assess Intervention</span>
|
|
249
|
+
</div>
|
|
250
|
+
<div className="mt-2 text-xs text-stone-400">
|
|
251
|
+
Processing probabilities from Groan Zone classifier...
|
|
252
|
+
</div>
|
|
253
|
+
</CardContent>
|
|
254
|
+
</Card>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
{/* Right Sidebar: Logs & Intervention */}
|
|
260
|
+
<aside className="w-96 border-l border-stone-200 dark:border-stone-800 bg-white dark:bg-stone-900 flex flex-col shadow-xl z-10">
|
|
261
|
+
|
|
262
|
+
{/* Intervention Preview Card (Top Priority) */}
|
|
263
|
+
<div className="p-4 border-b border-stone-100 dark:border-stone-800 bg-stone-50/50 dark:bg-stone-900/50">
|
|
264
|
+
<div className="flex items-center justify-between mb-3">
|
|
265
|
+
<h3 className="text-sm font-semibold flex items-center gap-2">
|
|
266
|
+
<Zap size={16} className="text-amber-500" />
|
|
267
|
+
Proposed Intervention
|
|
268
|
+
</h3>
|
|
269
|
+
<Badge className={cn(
|
|
270
|
+
"font-mono text-[10px]",
|
|
271
|
+
MOCK_DATA.currentIntervention.confidence > 0.9 ? "bg-emerald-500 hover:bg-emerald-600" : "bg-amber-500"
|
|
272
|
+
)}>
|
|
273
|
+
{Math.round(MOCK_DATA.currentIntervention.confidence * 100)}% CONFIDENCE
|
|
274
|
+
</Badge>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<Card className="border-indigo-100 dark:border-indigo-900/30 shadow-sm overflow-hidden">
|
|
278
|
+
<div className="h-1 bg-indigo-500 w-full" />
|
|
279
|
+
<CardContent className="p-3">
|
|
280
|
+
<p className="text-sm font-medium leading-relaxed italic text-stone-700 dark:text-stone-300">
|
|
281
|
+
"{MOCK_DATA.currentIntervention.content}"
|
|
282
|
+
</p>
|
|
283
|
+
</CardContent>
|
|
284
|
+
<CardFooter className="p-2 bg-stone-50 dark:bg-stone-800/50 text-xs text-stone-500 border-t border-stone-100 dark:border-stone-800">
|
|
285
|
+
Rationale: {MOCK_DATA.currentIntervention.rationale}
|
|
286
|
+
</CardFooter>
|
|
287
|
+
</Card>
|
|
288
|
+
|
|
289
|
+
<div className="grid grid-cols-2 gap-2 mt-3">
|
|
290
|
+
<Button variant="outline" size="sm" className="w-full text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20 border-red-200 dark:border-red-900">
|
|
291
|
+
<XCircle size={14} className="mr-2" /> Reject
|
|
292
|
+
</Button>
|
|
293
|
+
<Button size="sm" className="w-full bg-indigo-600 hover:bg-indigo-700 text-white">
|
|
294
|
+
<CheckCircle2 size={14} className="mr-2" /> Approve
|
|
295
|
+
</Button>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
{/* Logs Feed */}
|
|
300
|
+
<div className="flex-1 flex flex-col min-h-0">
|
|
301
|
+
<div className="px-4 py-3 border-b border-stone-100 dark:border-stone-800 flex items-center justify-between bg-white dark:bg-stone-900 sticky top-0">
|
|
302
|
+
<span className="text-xs font-semibold uppercase tracking-wider text-stone-500">System Logs</span>
|
|
303
|
+
<div className="flex gap-1">
|
|
304
|
+
<Button variant="ghost" size="icon" className="h-6 w-6"><Terminal size={12} /></Button>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<ScrollArea className="flex-1 p-4">
|
|
309
|
+
<div className="space-y-4">
|
|
310
|
+
{MOCK_DATA.logs.map((log) => (
|
|
311
|
+
<div key={log.id} className="flex gap-3 text-sm group">
|
|
312
|
+
<div className="shrink-0 pt-0.5">
|
|
313
|
+
{log.level === 'info' && <div className="w-2 h-2 rounded-full bg-blue-400 mt-1.5" />}
|
|
314
|
+
{log.level === 'warning' && <AlertTriangle size={14} className="text-amber-500 mt-0.5" />}
|
|
315
|
+
{log.level === 'success' && <CheckCircle2 size={14} className="text-emerald-500 mt-0.5" />}
|
|
316
|
+
</div>
|
|
317
|
+
<div className="space-y-0.5">
|
|
318
|
+
<div className="flex items-center gap-2">
|
|
319
|
+
<span className="font-mono text-[10px] text-stone-400">
|
|
320
|
+
{new Date(log.timestamp).toLocaleTimeString([], { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' })}
|
|
321
|
+
</span>
|
|
322
|
+
<span className={cn(
|
|
323
|
+
"text-[10px] font-semibold uppercase px-1 rounded",
|
|
324
|
+
log.level === 'warning' ? "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400" :
|
|
325
|
+
log.level === 'success' ? "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400" :
|
|
326
|
+
"bg-stone-100 text-stone-600 dark:bg-stone-800 dark:text-stone-400"
|
|
327
|
+
)}>{log.level}</span>
|
|
328
|
+
</div>
|
|
329
|
+
<p className="text-stone-600 dark:text-stone-400 leading-snug group-hover:text-stone-900 dark:group-hover:text-stone-200 transition-colors">
|
|
330
|
+
{log.message}
|
|
331
|
+
</p>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
))}
|
|
335
|
+
|
|
336
|
+
{/* Live typing indicator */}
|
|
337
|
+
<div className="flex gap-3 pt-2 opacity-50">
|
|
338
|
+
<div className="w-2 h-2 rounded-full bg-stone-300 animate-pulse mt-1.5 ml-0.5" />
|
|
339
|
+
<div className="h-3 w-24 bg-stone-200 dark:bg-stone-800 rounded animate-pulse" />
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</ScrollArea>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
</aside>
|
|
346
|
+
</div>
|
|
347
|
+
);
|
|
348
|
+
}
|