@evolve.labs/devflow 0.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/.claude/commands/agents/architect.md +1162 -0
- package/.claude/commands/agents/architect.meta.yaml +124 -0
- package/.claude/commands/agents/builder.md +1432 -0
- package/.claude/commands/agents/builder.meta.yaml +117 -0
- package/.claude/commands/agents/chronicler.md +633 -0
- package/.claude/commands/agents/chronicler.meta.yaml +217 -0
- package/.claude/commands/agents/guardian.md +456 -0
- package/.claude/commands/agents/guardian.meta.yaml +127 -0
- package/.claude/commands/agents/strategist.md +483 -0
- package/.claude/commands/agents/strategist.meta.yaml +158 -0
- package/.claude/commands/agents/system-designer.md +1137 -0
- package/.claude/commands/agents/system-designer.meta.yaml +156 -0
- package/.claude/commands/devflow-help.md +93 -0
- package/.claude/commands/devflow-status.md +60 -0
- package/.claude/commands/quick/create-adr.md +82 -0
- package/.claude/commands/quick/new-feature.md +57 -0
- package/.claude/commands/quick/security-check.md +54 -0
- package/.claude/commands/quick/system-design.md +58 -0
- package/.claude_project +52 -0
- package/.devflow/agents/architect.meta.yaml +122 -0
- package/.devflow/agents/builder.meta.yaml +116 -0
- package/.devflow/agents/chronicler.meta.yaml +222 -0
- package/.devflow/agents/guardian.meta.yaml +127 -0
- package/.devflow/agents/strategist.meta.yaml +158 -0
- package/.devflow/agents/system-designer.meta.yaml +265 -0
- package/.devflow/project.yaml +242 -0
- package/.gitignore-template +84 -0
- package/LICENSE +21 -0
- package/README.md +249 -0
- package/bin/devflow.js +54 -0
- package/lib/autopilot.js +235 -0
- package/lib/autopilotConstants.js +213 -0
- package/lib/constants.js +95 -0
- package/lib/init.js +200 -0
- package/lib/update.js +181 -0
- package/lib/utils.js +157 -0
- package/lib/web.js +119 -0
- package/package.json +57 -0
- package/web/CHANGELOG.md +192 -0
- package/web/README.md +156 -0
- package/web/app/api/autopilot/execute/route.ts +102 -0
- package/web/app/api/autopilot/terminal-execute/route.ts +124 -0
- package/web/app/api/files/route.ts +280 -0
- package/web/app/api/files/tree/route.ts +160 -0
- package/web/app/api/git/route.ts +201 -0
- package/web/app/api/health/route.ts +94 -0
- package/web/app/api/project/open/route.ts +134 -0
- package/web/app/api/search/route.ts +247 -0
- package/web/app/api/specs/route.ts +405 -0
- package/web/app/api/terminal/route.ts +222 -0
- package/web/app/globals.css +160 -0
- package/web/app/ide/layout.tsx +43 -0
- package/web/app/ide/page.tsx +216 -0
- package/web/app/layout.tsx +34 -0
- package/web/app/page.tsx +303 -0
- package/web/components/agents/AgentIcons.tsx +281 -0
- package/web/components/autopilot/AutopilotConfigModal.tsx +245 -0
- package/web/components/autopilot/AutopilotPanel.tsx +299 -0
- package/web/components/dashboard/DashboardPanel.tsx +393 -0
- package/web/components/editor/Breadcrumbs.tsx +134 -0
- package/web/components/editor/EditorPanel.tsx +120 -0
- package/web/components/editor/EditorTabs.tsx +229 -0
- package/web/components/editor/MarkdownPreview.tsx +154 -0
- package/web/components/editor/MermaidDiagram.tsx +113 -0
- package/web/components/editor/MonacoEditor.tsx +177 -0
- package/web/components/editor/TabContextMenu.tsx +207 -0
- package/web/components/git/GitPanel.tsx +534 -0
- package/web/components/layout/Shell.tsx +15 -0
- package/web/components/layout/StatusBar.tsx +100 -0
- package/web/components/modals/CommandPalette.tsx +393 -0
- package/web/components/modals/GlobalSearch.tsx +348 -0
- package/web/components/modals/QuickOpen.tsx +241 -0
- package/web/components/modals/RecentFiles.tsx +208 -0
- package/web/components/projects/ProjectSelector.tsx +147 -0
- package/web/components/settings/SettingItem.tsx +150 -0
- package/web/components/settings/SettingsPanel.tsx +323 -0
- package/web/components/specs/SpecsPanel.tsx +1091 -0
- package/web/components/terminal/TerminalPanel.tsx +683 -0
- package/web/components/ui/ContextMenu.tsx +182 -0
- package/web/components/ui/LoadingSpinner.tsx +66 -0
- package/web/components/ui/ResizeHandle.tsx +110 -0
- package/web/components/ui/Skeleton.tsx +108 -0
- package/web/components/ui/SkipLinks.tsx +37 -0
- package/web/components/ui/Toaster.tsx +57 -0
- package/web/hooks/useFocusTrap.ts +141 -0
- package/web/hooks/useKeyboardShortcuts.ts +169 -0
- package/web/hooks/useListNavigation.ts +237 -0
- package/web/lib/autopilotConstants.ts +213 -0
- package/web/lib/constants/agents.ts +67 -0
- package/web/lib/git.ts +339 -0
- package/web/lib/ptyManager.ts +191 -0
- package/web/lib/specsParser.ts +299 -0
- package/web/lib/stores/autopilotStore.ts +288 -0
- package/web/lib/stores/fileStore.ts +550 -0
- package/web/lib/stores/gitStore.ts +386 -0
- package/web/lib/stores/projectStore.ts +196 -0
- package/web/lib/stores/settingsStore.ts +126 -0
- package/web/lib/stores/specsStore.ts +297 -0
- package/web/lib/stores/uiStore.ts +175 -0
- package/web/lib/types/index.ts +177 -0
- package/web/lib/utils.ts +98 -0
- package/web/next.config.js +50 -0
- package/web/package.json +54 -0
- package/web/postcss.config.js +6 -0
- package/web/tailwind.config.ts +68 -0
- package/web/tsconfig.json +41 -0
package/web/lib/utils.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { clsx, type ClassValue } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Merge Tailwind classes with clsx
|
|
6
|
+
*/
|
|
7
|
+
export function cn(...inputs: ClassValue[]) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Debounce function execution
|
|
13
|
+
*/
|
|
14
|
+
export function debounce<T extends (...args: unknown[]) => unknown>(
|
|
15
|
+
func: T,
|
|
16
|
+
wait: number
|
|
17
|
+
): (...args: Parameters<T>) => void {
|
|
18
|
+
let timeout: NodeJS.Timeout | null = null;
|
|
19
|
+
|
|
20
|
+
return (...args: Parameters<T>) => {
|
|
21
|
+
if (timeout) clearTimeout(timeout);
|
|
22
|
+
timeout = setTimeout(() => func(...args), wait);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get file extension from path
|
|
28
|
+
*/
|
|
29
|
+
export function getExtension(path: string): string {
|
|
30
|
+
const parts = path.split('.');
|
|
31
|
+
return parts.length > 1 ? parts.pop()! : '';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get file name from path
|
|
36
|
+
*/
|
|
37
|
+
export function getFileName(path: string): string {
|
|
38
|
+
return path.split('/').pop() || path;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get parent directory from path
|
|
43
|
+
*/
|
|
44
|
+
export function getParentDir(path: string): string {
|
|
45
|
+
const parts = path.split('/');
|
|
46
|
+
parts.pop();
|
|
47
|
+
return parts.join('/') || '/';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if path is within base path (security)
|
|
52
|
+
*/
|
|
53
|
+
export function isPathWithinBase(basePath: string, targetPath: string): boolean {
|
|
54
|
+
const normalizedBase = basePath.replace(/\/$/, '');
|
|
55
|
+
const normalizedTarget = targetPath.replace(/\/$/, '');
|
|
56
|
+
return normalizedTarget.startsWith(normalizedBase);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get language from file extension for Monaco
|
|
61
|
+
*/
|
|
62
|
+
export function getLanguageFromExtension(ext: string): string {
|
|
63
|
+
const languageMap: Record<string, string> = {
|
|
64
|
+
ts: 'typescript',
|
|
65
|
+
tsx: 'typescript',
|
|
66
|
+
js: 'javascript',
|
|
67
|
+
jsx: 'javascript',
|
|
68
|
+
md: 'markdown',
|
|
69
|
+
yaml: 'yaml',
|
|
70
|
+
yml: 'yaml',
|
|
71
|
+
json: 'json',
|
|
72
|
+
html: 'html',
|
|
73
|
+
css: 'css',
|
|
74
|
+
scss: 'scss',
|
|
75
|
+
py: 'python',
|
|
76
|
+
sh: 'shell',
|
|
77
|
+
bash: 'shell',
|
|
78
|
+
};
|
|
79
|
+
return languageMap[ext] || 'plaintext';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Format file size in human-readable format
|
|
84
|
+
*/
|
|
85
|
+
export function formatFileSize(bytes: number): string {
|
|
86
|
+
if (bytes === 0) return '0 B';
|
|
87
|
+
const k = 1024;
|
|
88
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
89
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
90
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Generate unique ID
|
|
95
|
+
*/
|
|
96
|
+
export function generateId(): string {
|
|
97
|
+
return crypto.randomUUID();
|
|
98
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** @type {import('next').NextConfig} */
|
|
2
|
+
const nextConfig = {
|
|
3
|
+
// Enable React strict mode for better development experience
|
|
4
|
+
reactStrictMode: true,
|
|
5
|
+
|
|
6
|
+
// Disable server-side rendering for Monaco Editor
|
|
7
|
+
transpilePackages: ['@monaco-editor/react'],
|
|
8
|
+
|
|
9
|
+
// Turbopack config (Next.js 16+)
|
|
10
|
+
turbopack: {},
|
|
11
|
+
|
|
12
|
+
// Exclude native modules from client-side bundling
|
|
13
|
+
serverExternalPackages: ['node-pty'],
|
|
14
|
+
|
|
15
|
+
// Webpack config for native modules
|
|
16
|
+
webpack: (config, { isServer }) => {
|
|
17
|
+
if (!isServer) {
|
|
18
|
+
// Don't bundle node-pty on client side
|
|
19
|
+
config.resolve.fallback = {
|
|
20
|
+
...config.resolve.fallback,
|
|
21
|
+
fs: false,
|
|
22
|
+
child_process: false,
|
|
23
|
+
net: false,
|
|
24
|
+
tls: false,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return config;
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// Security headers for local development
|
|
31
|
+
async headers() {
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
source: '/:path*',
|
|
35
|
+
headers: [
|
|
36
|
+
{
|
|
37
|
+
key: 'X-Frame-Options',
|
|
38
|
+
value: 'DENY',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: 'X-Content-Type-Options',
|
|
42
|
+
value: 'nosniff',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
module.exports = nextConfig;
|
package/web/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "devflow-ide",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "./node_modules/.bin/next dev",
|
|
7
|
+
"build": "./node_modules/.bin/next build",
|
|
8
|
+
"start": "./node_modules/.bin/next start",
|
|
9
|
+
"lint": "./node_modules/.bin/next lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@monaco-editor/react": "^4.6.0",
|
|
13
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
14
|
+
"@radix-ui/react-dialog": "^1.1.4",
|
|
15
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
16
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
17
|
+
"@radix-ui/react-separator": "^1.1.1",
|
|
18
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
19
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
20
|
+
"@radix-ui/react-tooltip": "^1.1.5",
|
|
21
|
+
"@xterm/addon-fit": "^0.10.0",
|
|
22
|
+
"@xterm/addon-web-links": "^0.11.0",
|
|
23
|
+
"@xterm/addon-webgl": "^0.19.0",
|
|
24
|
+
"@xterm/xterm": "^5.5.0",
|
|
25
|
+
"class-variance-authority": "^0.7.1",
|
|
26
|
+
"clsx": "^2.1.1",
|
|
27
|
+
"lucide-react": "^0.468.0",
|
|
28
|
+
"mermaid": "^11.4.0",
|
|
29
|
+
"next": "^16.1.0",
|
|
30
|
+
"node-pty": "^1.0.0",
|
|
31
|
+
"react": "^18.3.1",
|
|
32
|
+
"react-dom": "^18.3.1",
|
|
33
|
+
"react-markdown": "^9.0.1",
|
|
34
|
+
"rehype-highlight": "^7.0.1",
|
|
35
|
+
"remark-gfm": "^4.0.0",
|
|
36
|
+
"simple-git": "^3.30.0",
|
|
37
|
+
"sonner": "^2.0.7",
|
|
38
|
+
"tailwind-merge": "^2.5.5",
|
|
39
|
+
"xterm": "^5.3.0",
|
|
40
|
+
"xterm-addon-fit": "^0.8.0",
|
|
41
|
+
"zustand": "^5.0.2"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "22.19.3",
|
|
45
|
+
"@types/react": "18.3.27",
|
|
46
|
+
"@types/react-dom": "^18.3.2",
|
|
47
|
+
"autoprefixer": "^10.4.20",
|
|
48
|
+
"eslint": "^8.57.1",
|
|
49
|
+
"eslint-config-next": "14.2.18",
|
|
50
|
+
"postcss": "^8.4.49",
|
|
51
|
+
"tailwindcss": "^3.4.17",
|
|
52
|
+
"typescript": "5.9.3"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Config } from 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
const config: Config = {
|
|
4
|
+
darkMode: ['class'],
|
|
5
|
+
content: [
|
|
6
|
+
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
|
|
7
|
+
'./components/**/*.{js,ts,jsx,tsx,mdx}',
|
|
8
|
+
'./app/**/*.{js,ts,jsx,tsx,mdx}',
|
|
9
|
+
],
|
|
10
|
+
theme: {
|
|
11
|
+
extend: {
|
|
12
|
+
colors: {
|
|
13
|
+
border: 'hsl(var(--border))',
|
|
14
|
+
input: 'hsl(var(--input))',
|
|
15
|
+
ring: 'hsl(var(--ring))',
|
|
16
|
+
background: 'hsl(var(--background))',
|
|
17
|
+
foreground: 'hsl(var(--foreground))',
|
|
18
|
+
primary: {
|
|
19
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
20
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
21
|
+
},
|
|
22
|
+
secondary: {
|
|
23
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
24
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
25
|
+
},
|
|
26
|
+
destructive: {
|
|
27
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
28
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
29
|
+
},
|
|
30
|
+
muted: {
|
|
31
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
32
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
33
|
+
},
|
|
34
|
+
accent: {
|
|
35
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
36
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
37
|
+
},
|
|
38
|
+
popover: {
|
|
39
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
40
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
41
|
+
},
|
|
42
|
+
card: {
|
|
43
|
+
DEFAULT: 'hsl(var(--card))',
|
|
44
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
45
|
+
},
|
|
46
|
+
// Agent colors
|
|
47
|
+
agent: {
|
|
48
|
+
strategist: '#3B82F6',
|
|
49
|
+
architect: '#8B5CF6',
|
|
50
|
+
builder: '#F59E0B',
|
|
51
|
+
guardian: '#10B981',
|
|
52
|
+
chronicler: '#EC4899',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
borderRadius: {
|
|
56
|
+
lg: 'var(--radius)',
|
|
57
|
+
md: 'calc(var(--radius) - 2px)',
|
|
58
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
59
|
+
},
|
|
60
|
+
fontFamily: {
|
|
61
|
+
mono: ['JetBrains Mono', 'Fira Code', 'monospace'],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
plugins: [],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default config;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"dom",
|
|
5
|
+
"dom.iterable",
|
|
6
|
+
"esnext"
|
|
7
|
+
],
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"module": "esnext",
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"isolatedModules": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
"incremental": true,
|
|
19
|
+
"plugins": [
|
|
20
|
+
{
|
|
21
|
+
"name": "next"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"paths": {
|
|
25
|
+
"@/*": [
|
|
26
|
+
"./*"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"target": "ES2017"
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"next-env.d.ts",
|
|
33
|
+
"**/*.ts",
|
|
34
|
+
"**/*.tsx",
|
|
35
|
+
".next/types/**/*.ts",
|
|
36
|
+
".next/dev/types/**/*.ts"
|
|
37
|
+
],
|
|
38
|
+
"exclude": [
|
|
39
|
+
"node_modules"
|
|
40
|
+
]
|
|
41
|
+
}
|