ultra-dex 3.1.0 → 3.2.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/README.md +79 -74
- package/assets/code-patterns/clerk-middleware.ts +138 -0
- package/assets/code-patterns/prisma-schema.prisma +224 -0
- package/assets/code-patterns/rls-policies.sql +246 -0
- package/assets/code-patterns/server-actions.ts +191 -0
- package/assets/code-patterns/trpc-router.ts +258 -0
- package/assets/cursor-rules/13-ai-integration.mdc +155 -0
- package/assets/cursor-rules/14-server-components.mdc +81 -0
- package/assets/cursor-rules/15-server-actions.mdc +102 -0
- package/assets/cursor-rules/16-edge-middleware.mdc +105 -0
- package/assets/cursor-rules/17-streaming-ssr.mdc +138 -0
- package/bin/ultra-dex.js +38 -1
- package/lib/commands/agents.js +16 -13
- package/lib/commands/banner.js +43 -21
- package/lib/commands/build.js +26 -17
- package/lib/commands/doctor.js +98 -79
- package/lib/commands/generate.js +19 -16
- package/lib/commands/init.js +52 -56
- package/lib/commands/scaffold.js +151 -0
- package/lib/commands/serve.js +15 -13
- package/lib/commands/state.js +43 -70
- package/lib/commands/swarm.js +31 -9
- package/lib/config/theme.js +47 -0
- package/lib/templates/code/clerk-middleware.ts +138 -0
- package/lib/templates/code/prisma-schema.prisma +224 -0
- package/lib/templates/code/rls-policies.sql +246 -0
- package/lib/templates/code/server-actions.ts +191 -0
- package/lib/templates/code/trpc-router.ts +258 -0
- package/lib/themes/doomsday.js +229 -0
- package/lib/ui/index.js +5 -0
- package/lib/ui/interface.js +241 -0
- package/lib/ui/spinners.js +116 -0
- package/lib/ui/theme.js +183 -0
- package/lib/utils/agents.js +32 -0
- package/lib/utils/help.js +64 -0
- package/lib/utils/messages.js +35 -0
- package/lib/utils/progress.js +24 -0
- package/lib/utils/prompts.js +47 -0
- package/lib/utils/spinners.js +46 -0
- package/lib/utils/status.js +31 -0
- package/lib/utils/tables.js +41 -0
- package/lib/utils/theme-state.js +9 -0
- package/lib/utils/version-display.js +32 -0
- package/package.json +10 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import ora from 'ora';
|
|
3
|
+
|
|
4
|
+
export function showProgress(tasks) {
|
|
5
|
+
const total = tasks.length;
|
|
6
|
+
console.log('');
|
|
7
|
+
console.log(chalk.hex('#8b5cf6').bold(' ⚡ EXECUTING TASKS...'));
|
|
8
|
+
console.log('');
|
|
9
|
+
|
|
10
|
+
tasks.forEach((task, idx) => {
|
|
11
|
+
// Simple vertical list for now
|
|
12
|
+
console.log(` ${chalk.hex('#d946ef')('►')} ${task}`);
|
|
13
|
+
});
|
|
14
|
+
console.log('');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function progressBar(current, total, width = 40) {
|
|
18
|
+
const percentage = Math.round((current / total) * 100);
|
|
19
|
+
const filled = Math.round((current / total) * width);
|
|
20
|
+
const empty = width - filled;
|
|
21
|
+
|
|
22
|
+
const bar = chalk.hex('#6366f1')('█'.repeat(filled)) + chalk.dim('░'.repeat(empty));
|
|
23
|
+
return `${bar} ${chalk.hex('#d946ef')(percentage + '%')}`;
|
|
24
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import gradient from 'gradient-string';
|
|
4
|
+
|
|
5
|
+
export async function selectAgent() {
|
|
6
|
+
const agents = [
|
|
7
|
+
{ name: '🏛️ CTO - Architecture decisions', value: 'cto' },
|
|
8
|
+
{ name: '📋 Planner - Task breakdown', value: 'planner' },
|
|
9
|
+
{ name: '🔧 Backend - API & server', value: 'backend' },
|
|
10
|
+
{ name: '🎨 Frontend - UI components', value: 'frontend' },
|
|
11
|
+
{ name: '💾 Database - Schema & queries', value: 'database' },
|
|
12
|
+
{ name: '🔐 Auth - Authentication', value: 'auth' },
|
|
13
|
+
{ name: '🛡️ Security - Security review', value: 'security' },
|
|
14
|
+
{ name: '📝 Testing - Write tests', value: 'testing' },
|
|
15
|
+
{ name: '📖 Docs - Documentation', value: 'documentation' },
|
|
16
|
+
{ name: '👀 Reviewer - Code review', value: 'reviewer' }
|
|
17
|
+
];
|
|
18
|
+
const { agent } = await inquirer.prompt([{
|
|
19
|
+
type: 'list',
|
|
20
|
+
name: 'agent',
|
|
21
|
+
message: gradient(['#6366f1', '#8b5cf6'])('Select an agent:'),
|
|
22
|
+
choices: agents,
|
|
23
|
+
pageSize: 12
|
|
24
|
+
}]);
|
|
25
|
+
|
|
26
|
+
return agent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export async function confirmAction(message) {
|
|
30
|
+
const { confirm } = await inquirer.prompt([{
|
|
31
|
+
type: 'confirm',
|
|
32
|
+
name: 'confirm',
|
|
33
|
+
message: chalk.yellow(message),
|
|
34
|
+
default: false
|
|
35
|
+
}]);
|
|
36
|
+
return confirm;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function inputText(message, defaultValue = '') {
|
|
40
|
+
const { value } = await inquirer.prompt([{
|
|
41
|
+
type: 'input',
|
|
42
|
+
name: 'value',
|
|
43
|
+
message: chalk.cyan(message),
|
|
44
|
+
default: defaultValue
|
|
45
|
+
}]);
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import ora from 'ora';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
|
|
4
|
+
const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
5
|
+
|
|
6
|
+
export function createSpinner(text) {
|
|
7
|
+
return ora({
|
|
8
|
+
text: chalk.cyan(text),
|
|
9
|
+
spinner: {
|
|
10
|
+
interval: 80,
|
|
11
|
+
frames: spinnerFrames
|
|
12
|
+
},
|
|
13
|
+
color: 'magenta'
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function success(text) {
|
|
18
|
+
return ora().succeed(chalk.green(text));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function fail(text) {
|
|
22
|
+
return ora().fail(chalk.red(text));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function info(text) {
|
|
26
|
+
return ora().info(chalk.blue(text));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function warn(text) {
|
|
30
|
+
return ora().warn(chalk.yellow(text));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Task list with progress
|
|
34
|
+
export async function runTasks(tasks) {
|
|
35
|
+
for (const task of tasks) {
|
|
36
|
+
const spinner = createSpinner(task.title);
|
|
37
|
+
spinner.start();
|
|
38
|
+
try {
|
|
39
|
+
await task.fn();
|
|
40
|
+
spinner.succeed(chalk.green(task.title));
|
|
41
|
+
} catch (error) {
|
|
42
|
+
spinner.fail(chalk.red(`${task.title}: ${error.message}`));
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import figures from 'figures';
|
|
3
|
+
|
|
4
|
+
export const icons = {
|
|
5
|
+
success: chalk.hex('#22c55e')(figures.tick),
|
|
6
|
+
error: chalk.hex('#ef4444')(figures.cross),
|
|
7
|
+
warning: chalk.hex('#f59e0b')(figures.warning),
|
|
8
|
+
info: chalk.hex('#6366f1')(figures.info),
|
|
9
|
+
pending: chalk.hex('#6b7280')(figures.circle),
|
|
10
|
+
running: chalk.hex('#d946ef')(figures.play),
|
|
11
|
+
pointer: chalk.hex('#8b5cf6')(figures.pointer),
|
|
12
|
+
bullet: chalk.dim(figures.bullet)
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function showInfinityStatus() {
|
|
16
|
+
// Deprecated function, kept for compatibility if called elsewhere but showing nothing or simple status
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function statusLine(icon, text) {
|
|
20
|
+
console.log(` ${icon} ${text}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function header(text) {
|
|
24
|
+
console.log('');
|
|
25
|
+
console.log(chalk.bold.hex('#8b5cf6')(` ${text}`));
|
|
26
|
+
console.log(chalk.dim(' ' + '─'.repeat(50)));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function separator() {
|
|
30
|
+
console.log('');
|
|
31
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Table from 'cli-table3';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import gradient from 'gradient-string';
|
|
4
|
+
|
|
5
|
+
export function createTable(headers, rows) {
|
|
6
|
+
const table = new Table({
|
|
7
|
+
head: headers.map(h => gradient(['#6366f1', '#8b5cf6'])(h)),
|
|
8
|
+
chars: {
|
|
9
|
+
'top': '─', 'top-mid': '┬', 'top-left': '╭', 'top-right': '╮',
|
|
10
|
+
'bottom': '─', 'bottom-mid': '┴', 'bottom-left': '╰', 'bottom-right': '╯',
|
|
11
|
+
'left': '│', 'left-mid': '├', 'mid': '─', 'mid-mid': '┼',
|
|
12
|
+
'right': '│', 'right-mid': '┤', 'middle': '│'
|
|
13
|
+
},
|
|
14
|
+
style: {
|
|
15
|
+
head: ['magenta'],
|
|
16
|
+
border: ['dim']
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
rows.forEach(row => table.push(row));
|
|
21
|
+
return table.toString();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function showAgentsTable(agents) {
|
|
25
|
+
const headers = ['Tier', 'Agent', 'Status'];
|
|
26
|
+
const rows = agents.map(a => [
|
|
27
|
+
chalk.dim(a.tier || 'N/A'),
|
|
28
|
+
chalk.cyan(a.name),
|
|
29
|
+
a.status === 'ready' ? chalk.green('●') : chalk.yellow('○')
|
|
30
|
+
]);
|
|
31
|
+
console.log(createTable(headers, rows));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function showCommandsTable(commands) {
|
|
35
|
+
const headers = ['Command', 'Description'];
|
|
36
|
+
const rows = commands.map(c => [
|
|
37
|
+
chalk.cyan(c.name),
|
|
38
|
+
chalk.dim(c.description)
|
|
39
|
+
]);
|
|
40
|
+
console.log(createTable(headers, rows));
|
|
41
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import boxen from 'boxen';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import gradient from 'gradient-string';
|
|
4
|
+
|
|
5
|
+
export function showVersionCard() {
|
|
6
|
+
const version = '3.1.0';
|
|
7
|
+
const ultra = gradient(['#6366f1', '#8b5cf6'])('Ultra-Dex');
|
|
8
|
+
|
|
9
|
+
console.log(boxen(
|
|
10
|
+
`${ultra} ${chalk.dim('v')}${chalk.bold.white(version)}
|
|
11
|
+
|
|
12
|
+
` +
|
|
13
|
+
`${chalk.cyan('◆')} AI Orchestration Meta-Layer
|
|
14
|
+
` +
|
|
15
|
+
`${chalk.magenta('◆')} 35 Commands • 16 Agents
|
|
16
|
+
` +
|
|
17
|
+
`${chalk.yellow('◆')} MCP Server • Swarm Mode
|
|
18
|
+
|
|
19
|
+
` +
|
|
20
|
+
`${chalk.dim('npm install -g ultra-dex')}
|
|
21
|
+
` +
|
|
22
|
+
`${chalk.dim('github.com/Srujan0798/Ultra-Dex')}`,
|
|
23
|
+
{
|
|
24
|
+
padding: 1,
|
|
25
|
+
margin: 1,
|
|
26
|
+
borderStyle: 'double',
|
|
27
|
+
borderColor: '#8b5cf6',
|
|
28
|
+
title: '🪐 Ultra-Dex',
|
|
29
|
+
titleAlignment: 'center'
|
|
30
|
+
}
|
|
31
|
+
));
|
|
32
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra-dex",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "AI Orchestration Meta-Layer for SaaS Development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -35,11 +35,20 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
38
|
+
"boxen": "^7.1.1",
|
|
38
39
|
"chalk": "^5.3.0",
|
|
40
|
+
"cli-table3": "^0.6.5",
|
|
39
41
|
"commander": "^11.1.0",
|
|
42
|
+
"figures": "^6.1.0",
|
|
40
43
|
"glob": "^10.5.0",
|
|
44
|
+
"gradient-string": "^2.0.2",
|
|
45
|
+
"ink": "^4.4.1",
|
|
46
|
+
"ink-spinner": "^5.0.0",
|
|
41
47
|
"inquirer": "^9.2.12",
|
|
48
|
+
"listr2": "^8.3.3",
|
|
42
49
|
"ora": "^8.0.1",
|
|
50
|
+
"terminal-link": "^3.0.0",
|
|
51
|
+
"update-notifier": "^7.3.1",
|
|
43
52
|
"ws": "^8.19.0",
|
|
44
53
|
"zod": "^3.25.76"
|
|
45
54
|
},
|