@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,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@antigravity/agent-os-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/agent-os-ui.umd.cjs",
|
|
6
|
+
"module": "./dist/agent-os-ui.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/agent-os-ui.js",
|
|
15
|
+
"require": "./dist/agent-os-ui.umd.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./style.css": "./dist/style.css"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "tsc && vite build",
|
|
22
|
+
"lint": "eslint ."
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"react": ">=18.0.0",
|
|
26
|
+
"react-dom": ">=18.0.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"clsx": "^2.1.0",
|
|
30
|
+
"lucide-react": "^0.469.0",
|
|
31
|
+
"react-markdown": "^9.0.0",
|
|
32
|
+
"remark-breaks": "^4.0.0",
|
|
33
|
+
"remark-gfm": "^4.0.0",
|
|
34
|
+
"tailwind-merge": "^2.2.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
38
|
+
"@types/node": "^20.10.0",
|
|
39
|
+
"@types/react": "^18.2.0",
|
|
40
|
+
"@types/react-dom": "^18.2.0",
|
|
41
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
42
|
+
"autoprefixer": "^10.4.16",
|
|
43
|
+
"postcss": "^8.4.32",
|
|
44
|
+
"react": "^18.3.1",
|
|
45
|
+
"react-dom": "^18.3.1",
|
|
46
|
+
"tailwindcss": "^3.4.0",
|
|
47
|
+
"tailwindcss-animate": "^1.0.7",
|
|
48
|
+
"typescript": "^5.3.3",
|
|
49
|
+
"vite": "^5.0.10",
|
|
50
|
+
"vite-plugin-dts": "^3.7.0"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
interface AgentShellProps {
|
|
4
|
+
sidebar: ReactNode
|
|
5
|
+
header?: ReactNode
|
|
6
|
+
children: ReactNode
|
|
7
|
+
className?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AgentShell({ sidebar, header, children, className }: AgentShellProps) {
|
|
11
|
+
return (
|
|
12
|
+
<div className={`flex h-screen bg-stone-50 dark:bg-stone-900 text-stone-900 dark:text-stone-100 font-sans transition-colors ${className || ''}`}>
|
|
13
|
+
{/* Sidebar Area */}
|
|
14
|
+
<div className="shrink-0">
|
|
15
|
+
{sidebar}
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
{/* Main Content Area */}
|
|
19
|
+
<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
|
|
20
|
+
{header && (
|
|
21
|
+
<div className="shrink-0">
|
|
22
|
+
{header}
|
|
23
|
+
</div>
|
|
24
|
+
)}
|
|
25
|
+
<main className="flex-1 overflow-auto bg-stone-50 dark:bg-black/20">
|
|
26
|
+
{children}
|
|
27
|
+
</main>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
interface SidebarItem {
|
|
4
|
+
label: string
|
|
5
|
+
icon?: ReactNode
|
|
6
|
+
active?: boolean
|
|
7
|
+
onClick?: () => void
|
|
8
|
+
badge?: string | number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface AgentSidebarProps {
|
|
12
|
+
title?: string
|
|
13
|
+
version?: string
|
|
14
|
+
items: SidebarItem[]
|
|
15
|
+
footer?: ReactNode
|
|
16
|
+
className?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function AgentSidebar({ title = "Agent OS", version = "v1.0", items, footer, className }: AgentSidebarProps) {
|
|
20
|
+
return (
|
|
21
|
+
<div className={`w-64 h-full bg-white dark:bg-stone-950 border-r border-stone-200 dark:border-stone-800 flex flex-col ${className || ''}`}>
|
|
22
|
+
{/* Header */}
|
|
23
|
+
<div className="p-6">
|
|
24
|
+
<div className="flex items-center gap-2 mb-1">
|
|
25
|
+
<div className="w-8 h-8 bg-stone-900 dark:bg-stone-100 rounded-lg flex items-center justify-center">
|
|
26
|
+
<div className="w-4 h-4 bg-white dark:bg-stone-900 rounded-sm" />
|
|
27
|
+
</div>
|
|
28
|
+
<span className="font-bold text-lg tracking-tight">{title}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div className="text-xs text-stone-500 font-mono pl-1">{version}</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
{/* Navigation */}
|
|
34
|
+
<div className="flex-1 px-4 space-y-1 overflow-y-auto">
|
|
35
|
+
{items.map((item, index) => (
|
|
36
|
+
<button
|
|
37
|
+
key={index}
|
|
38
|
+
onClick={item.onClick}
|
|
39
|
+
className={`w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm font-medium transition-colors ${item.active
|
|
40
|
+
? 'bg-stone-100 dark:bg-stone-800 text-stone-900 dark:text-stone-100'
|
|
41
|
+
: 'text-stone-600 dark:text-stone-400 hover:bg-stone-50 dark:hover:bg-stone-900'
|
|
42
|
+
}`}
|
|
43
|
+
>
|
|
44
|
+
<div className="flex items-center gap-3">
|
|
45
|
+
{item.icon}
|
|
46
|
+
<span>{item.label}</span>
|
|
47
|
+
</div>
|
|
48
|
+
{item.badge && (
|
|
49
|
+
<span className="text-xs bg-stone-200 dark:bg-stone-800 px-1.5 py-0.5 rounded-md">
|
|
50
|
+
{item.badge}
|
|
51
|
+
</span>
|
|
52
|
+
)}
|
|
53
|
+
</button>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
{/* Footer */}
|
|
58
|
+
{footer && (
|
|
59
|
+
<div className="p-4 border-t border-stone-200 dark:border-stone-800">
|
|
60
|
+
{footer}
|
|
61
|
+
</div>
|
|
62
|
+
)}
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { PromptButton } from './PromptButton'
|
|
2
|
+
|
|
3
|
+
interface GuidanceCardProps {
|
|
4
|
+
phase?: string
|
|
5
|
+
title: string
|
|
6
|
+
description: string
|
|
7
|
+
prompt?: string
|
|
8
|
+
actionLabel?: string
|
|
9
|
+
onAction?: () => void
|
|
10
|
+
onCopy?: (text: string) => void
|
|
11
|
+
className?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function GuidanceCard({
|
|
15
|
+
phase,
|
|
16
|
+
title,
|
|
17
|
+
description,
|
|
18
|
+
prompt,
|
|
19
|
+
actionLabel,
|
|
20
|
+
onAction,
|
|
21
|
+
onCopy,
|
|
22
|
+
className
|
|
23
|
+
}: GuidanceCardProps) {
|
|
24
|
+
const handleCopy = (text: string) => {
|
|
25
|
+
if (onCopy) {
|
|
26
|
+
onCopy(text)
|
|
27
|
+
} else if (navigator.clipboard) {
|
|
28
|
+
navigator.clipboard.writeText(text)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className={`bg-white dark:bg-stone-900 border border-stone-200 dark:border-stone-800 rounded-xl p-6 shadow-sm relative overflow-hidden ${className || ''}`}>
|
|
34
|
+
{/* Decorative Background Icon Effect - Optional, kept simple for package */}
|
|
35
|
+
|
|
36
|
+
<div className="relative z-10">
|
|
37
|
+
{phase && (
|
|
38
|
+
<div className="text-xs font-bold tracking-wider text-stone-500 uppercase mb-2">
|
|
39
|
+
{phase}
|
|
40
|
+
</div>
|
|
41
|
+
)}
|
|
42
|
+
|
|
43
|
+
<h2 className="text-2xl font-bold text-stone-900 dark:text-stone-100 mb-2">
|
|
44
|
+
{title}
|
|
45
|
+
</h2>
|
|
46
|
+
|
|
47
|
+
<p className="text-stone-600 dark:text-stone-400 mb-6 max-w-2xl leading-relaxed">
|
|
48
|
+
{description}
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<div className="flex flex-col sm:flex-row gap-4 items-start sm:items-center">
|
|
52
|
+
{prompt && (
|
|
53
|
+
<div className="flex-1 w-full sm:w-auto">
|
|
54
|
+
<PromptButton
|
|
55
|
+
label="Copy Prompt for Agent"
|
|
56
|
+
prompt={prompt}
|
|
57
|
+
onClick={handleCopy}
|
|
58
|
+
primary
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
|
|
63
|
+
{actionLabel && onAction && (
|
|
64
|
+
<button
|
|
65
|
+
onClick={onAction}
|
|
66
|
+
className="px-4 py-2 text-sm font-medium text-stone-700 dark:text-stone-300 bg-stone-100 dark:bg-stone-800 hover:bg-stone-200 dark:hover:bg-stone-700 rounded-lg transition-colors"
|
|
67
|
+
>
|
|
68
|
+
{actionLabel}
|
|
69
|
+
</button>
|
|
70
|
+
)}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ReactMarkdown from 'react-markdown'
|
|
2
|
+
import remarkGfm from 'remark-gfm'
|
|
3
|
+
import remarkBreaks from 'remark-breaks'
|
|
4
|
+
|
|
5
|
+
interface MarkdownViewerProps {
|
|
6
|
+
content: string
|
|
7
|
+
className?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function MarkdownViewer({ content, className }: MarkdownViewerProps) {
|
|
11
|
+
return (
|
|
12
|
+
<article className={`prose dark:prose-invert max-w-none
|
|
13
|
+
prose-headings:font-serif prose-headings:font-semibold
|
|
14
|
+
prose-a:text-stone-900 dark:prose-a:text-stone-100
|
|
15
|
+
prose-code:text-stone-900 dark:prose-code:text-stone-100
|
|
16
|
+
prose-pre:bg-stone-50 dark:prose-pre:bg-stone-900/50
|
|
17
|
+
prose-pre:border prose-pre:border-stone-200 dark:prose-pre:border-stone-800
|
|
18
|
+
prose-p:leading-relaxed prose-p:mb-4
|
|
19
|
+
${className || ''}`}>
|
|
20
|
+
<ReactMarkdown remarkPlugins={[remarkGfm, remarkBreaks]}>
|
|
21
|
+
{content || ''}
|
|
22
|
+
</ReactMarkdown>
|
|
23
|
+
</article>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Copy } from 'lucide-react'
|
|
2
|
+
|
|
3
|
+
interface PromptButtonProps {
|
|
4
|
+
label: string
|
|
5
|
+
prompt: string
|
|
6
|
+
onClick: (text: string) => void
|
|
7
|
+
small?: boolean
|
|
8
|
+
primary?: boolean
|
|
9
|
+
className?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function PromptButton({ label, prompt, onClick, small, primary, className }: PromptButtonProps) {
|
|
13
|
+
return (
|
|
14
|
+
<button
|
|
15
|
+
onClick={() => onClick(prompt)}
|
|
16
|
+
className={`flex items-center justify-center gap-2 rounded-lg font-medium transition cursor-pointer
|
|
17
|
+
${small ? 'px-3 py-1.5 text-xs flex-1' : 'px-4 py-2 text-sm w-full'}
|
|
18
|
+
${primary
|
|
19
|
+
? 'bg-stone-900 hover:bg-stone-800 dark:bg-stone-100 dark:hover:bg-white text-white dark:text-stone-900 shadow-sm'
|
|
20
|
+
: 'bg-white hover:bg-stone-100 dark:bg-stone-950 dark:hover:bg-stone-900 border border-stone-200 dark:border-stone-800 text-stone-900 dark:text-stone-100'}
|
|
21
|
+
${className || ''}
|
|
22
|
+
`}
|
|
23
|
+
>
|
|
24
|
+
<Copy size={small ? 12 : 14} />
|
|
25
|
+
{label}
|
|
26
|
+
</button>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
interface Status {
|
|
4
|
+
exists: boolean
|
|
5
|
+
completed?: number
|
|
6
|
+
total?: number
|
|
7
|
+
label?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface StatusItemProps {
|
|
11
|
+
label: string
|
|
12
|
+
status: Status | undefined | null
|
|
13
|
+
icon: ReactNode
|
|
14
|
+
small?: boolean
|
|
15
|
+
onClick?: () => void
|
|
16
|
+
className?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function StatusItem({ label, status, icon, small, onClick, className }: StatusItemProps) {
|
|
20
|
+
if (!status) return null
|
|
21
|
+
const isComplete = status.exists && (status.total && status.total > 0 ? status.completed === status.total : true)
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
onClick={onClick}
|
|
26
|
+
className={`flex items-center justify-between ${small ? 'text-xs' : 'text-sm'} ${onClick ? 'cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 p-1.5 -mx-1.5 rounded-md transition-colors group' : ''} ${className || ''}`}
|
|
27
|
+
>
|
|
28
|
+
<div className="flex items-center gap-2 text-stone-500 dark:text-stone-400 group-hover:text-stone-900 dark:group-hover:text-stone-200 transition-colors">
|
|
29
|
+
{icon}
|
|
30
|
+
<span>{label}</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div>
|
|
33
|
+
{status.exists ? (
|
|
34
|
+
<span className={`px-2 py-0.5 rounded-full text-xs font-medium border ${isComplete
|
|
35
|
+
? 'bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 border-emerald-200 dark:border-emerald-800'
|
|
36
|
+
: 'bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 border-amber-200 dark:border-amber-800'}`}>
|
|
37
|
+
{status.total && status.total > 0 ? `${status.completed}/${status.total}` : (status.label || 'Done')}
|
|
38
|
+
</span>
|
|
39
|
+
) : (
|
|
40
|
+
<span className="px-2 py-0.5 rounded-full text-xs font-medium bg-stone-100 dark:bg-stone-800 text-stone-500 dark:text-stone-400 border border-stone-200 dark:border-stone-700">Missing</span>
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react'
|
|
2
|
+
import { Moon, Sun } from 'lucide-react'
|
|
3
|
+
|
|
4
|
+
export type Theme = 'light' | 'dark' | 'system'
|
|
5
|
+
|
|
6
|
+
interface ThemeToggleProps {
|
|
7
|
+
onThemeChange?: (theme: Theme) => void
|
|
8
|
+
className?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ThemeToggle({ onThemeChange, className }: ThemeToggleProps) {
|
|
12
|
+
const [theme, setTheme] = useState<Theme>(() => {
|
|
13
|
+
if (typeof window !== 'undefined') {
|
|
14
|
+
return (localStorage.getItem('theme') as Theme) || 'system'
|
|
15
|
+
}
|
|
16
|
+
return 'system'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const root = document.documentElement
|
|
21
|
+
|
|
22
|
+
const applyTheme = (targetTheme: Theme) => {
|
|
23
|
+
if (targetTheme === 'system') {
|
|
24
|
+
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
25
|
+
root.classList.toggle('dark', systemDark)
|
|
26
|
+
} else {
|
|
27
|
+
root.classList.toggle('dark', targetTheme === 'dark')
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
applyTheme(theme)
|
|
32
|
+
localStorage.setItem('theme', theme)
|
|
33
|
+
|
|
34
|
+
// Notify parent
|
|
35
|
+
onThemeChange?.(theme)
|
|
36
|
+
|
|
37
|
+
// Listen for system theme changes when in system mode
|
|
38
|
+
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
|
39
|
+
const handleChange = () => {
|
|
40
|
+
if (theme === 'system') {
|
|
41
|
+
applyTheme('system')
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
mediaQuery.addEventListener('change', handleChange)
|
|
45
|
+
|
|
46
|
+
return () => mediaQuery.removeEventListener('change', handleChange)
|
|
47
|
+
}, [theme, onThemeChange])
|
|
48
|
+
|
|
49
|
+
const toggleTheme = () => {
|
|
50
|
+
setTheme((prev) => {
|
|
51
|
+
if (prev === 'light') return 'dark'
|
|
52
|
+
if (prev === 'dark') return 'system'
|
|
53
|
+
return 'light'
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const isDark = theme === 'dark' || (theme === 'system' && typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<button
|
|
61
|
+
onClick={toggleTheme}
|
|
62
|
+
className={`w-9 h-9 flex items-center justify-center rounded-md text-stone-500 hover:text-stone-900 dark:text-stone-400 dark:hover:text-stone-100 hover:bg-stone-100 dark:hover:bg-stone-800 transition-colors ${className || ''}`}
|
|
63
|
+
title={`Theme: ${theme}`}
|
|
64
|
+
>
|
|
65
|
+
{isDark ? (
|
|
66
|
+
<Moon className="w-5 h-5" strokeWidth={1.5} />
|
|
67
|
+
) : (
|
|
68
|
+
<Sun className="w-5 h-5" strokeWidth={1.5} />
|
|
69
|
+
)}
|
|
70
|
+
</button>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './style.css'
|
|
2
|
+
|
|
3
|
+
export { AgentShell } from './components/AgentShell'
|
|
4
|
+
export { AgentSidebar } from './components/AgentSidebar'
|
|
5
|
+
export { GuidanceCard } from './components/GuidanceCard'
|
|
6
|
+
export { ThemeToggle } from './components/ThemeToggle'
|
|
7
|
+
export { PromptButton } from './components/PromptButton'
|
|
8
|
+
export { StatusItem } from './components/StatusItem'
|
|
9
|
+
export { MarkdownViewer } from './components/MarkdownViewer'
|
|
10
|
+
// Export types if needed
|
|
11
|
+
export type { Theme } from './components/ThemeToggle'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: [
|
|
4
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
5
|
+
],
|
|
6
|
+
darkMode: 'class',
|
|
7
|
+
theme: {
|
|
8
|
+
extend: {
|
|
9
|
+
colors: {
|
|
10
|
+
border: "hsl(var(--border))",
|
|
11
|
+
input: "hsl(var(--input))",
|
|
12
|
+
ring: "hsl(var(--ring))",
|
|
13
|
+
background: "hsl(var(--background))",
|
|
14
|
+
foreground: "hsl(var(--foreground))",
|
|
15
|
+
primary: {
|
|
16
|
+
DEFAULT: "hsl(var(--primary))",
|
|
17
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
18
|
+
},
|
|
19
|
+
secondary: {
|
|
20
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
21
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
22
|
+
},
|
|
23
|
+
destructive: {
|
|
24
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
25
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
26
|
+
},
|
|
27
|
+
muted: {
|
|
28
|
+
DEFAULT: "hsl(var(--muted))",
|
|
29
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
30
|
+
},
|
|
31
|
+
accent: {
|
|
32
|
+
DEFAULT: "hsl(var(--accent))",
|
|
33
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
34
|
+
},
|
|
35
|
+
popover: {
|
|
36
|
+
DEFAULT: "hsl(var(--popover))",
|
|
37
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
38
|
+
},
|
|
39
|
+
card: {
|
|
40
|
+
DEFAULT: "hsl(var(--card))",
|
|
41
|
+
foreground: "hsl(var(--card-foreground))",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
plugins: [
|
|
47
|
+
require('tailwindcss-animate'),
|
|
48
|
+
require('@tailwindcss/typography'),
|
|
49
|
+
],
|
|
50
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2020",
|
|
7
|
+
"DOM",
|
|
8
|
+
"DOM.Iterable"
|
|
9
|
+
],
|
|
10
|
+
"module": "ESNext",
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"declaration": true,
|
|
23
|
+
"baseUrl": ".",
|
|
24
|
+
"paths": {
|
|
25
|
+
"@/*": [
|
|
26
|
+
"./src/*"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"src"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import dts from 'vite-plugin-dts';
|
|
4
|
+
import { resolve } from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = resolve(__filename, '..');
|
|
9
|
+
|
|
10
|
+
export default defineConfig({
|
|
11
|
+
plugins: [
|
|
12
|
+
react(),
|
|
13
|
+
dts({ include: ['src'] })
|
|
14
|
+
],
|
|
15
|
+
build: {
|
|
16
|
+
lib: {
|
|
17
|
+
entry: resolve(__dirname, 'src/index.ts'),
|
|
18
|
+
name: 'AgentOSUI',
|
|
19
|
+
fileName: 'agent-os-ui',
|
|
20
|
+
},
|
|
21
|
+
rollupOptions: {
|
|
22
|
+
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
|
23
|
+
output: {
|
|
24
|
+
globals: {
|
|
25
|
+
react: 'React',
|
|
26
|
+
'react-dom': 'ReactDOM',
|
|
27
|
+
'react/jsx-runtime': 'jsxRuntime',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|