ultra-dex 3.1.0 → 3.3.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 +50 -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/cloud.js +780 -0
- package/lib/commands/doctor.js +98 -79
- package/lib/commands/exec.js +434 -0
- package/lib/commands/generate.js +19 -16
- package/lib/commands/github.js +475 -0
- package/lib/commands/init.js +52 -56
- package/lib/commands/scaffold.js +151 -0
- package/lib/commands/search.js +477 -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/mcp/client.js +502 -0
- package/lib/providers/agent-sdk.js +630 -0
- package/lib/providers/anthropic-agents.js +580 -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/browser.js +373 -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 +19 -4
package/lib/commands/banner.js
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import gradient from 'gradient-string';
|
|
2
|
+
import boxen from 'boxen';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
|
|
5
|
+
const ultraGradient = gradient(['#6366f1', '#8b5cf6', '#d946ef']);
|
|
6
|
+
|
|
7
|
+
const asciiLogo = `
|
|
8
|
+
██╗ ██╗██╗ ████████╗██████╗ █████╗ ██████╗ ███████╗██╗ ██╗
|
|
9
|
+
██║ ██║██║ ╚══██╔══╝██╔══██╗██╔══██╗ ██╔══██╗██╔════╝╚██╗██╔╝
|
|
10
|
+
██║ ██║██║ ██║ ██████╔╝███████║█████╗██║ ██║█████╗ ╚███╔╝
|
|
11
|
+
██║ ██║██║ ██║ ██╔══██╗██╔══██║╚════╝██║ ██║██╔══╝ ██╔██╗
|
|
12
|
+
╚██████╔╝███████╗██║ ██║ ██║██║ ██║ ██████╔╝███████╗██╔╝ ██╗
|
|
13
|
+
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝`;
|
|
14
|
+
|
|
15
|
+
export const banner = asciiLogo;
|
|
16
|
+
|
|
17
|
+
export function showBanner(version = '3.2.0') {
|
|
18
|
+
console.log(ultraGradient(asciiLogo));
|
|
19
|
+
console.log(boxen(
|
|
20
|
+
`${chalk.hex('#8b5cf6').bold('🪐 Ultra-Dex')} ${chalk.dim('v' + version)}
|
|
21
|
+
|
|
22
|
+
` +
|
|
23
|
+
`${chalk.hex('#6366f1')('AI Orchestration Meta-Layer')}
|
|
24
|
+
|
|
25
|
+
` +
|
|
26
|
+
`${chalk.dim('github.com/Srujan0798/Ultra-Dex')}`,
|
|
27
|
+
{
|
|
28
|
+
padding: 1,
|
|
29
|
+
margin: 1,
|
|
30
|
+
borderStyle: 'round',
|
|
31
|
+
borderColor: '#8b5cf6',
|
|
32
|
+
dimBorder: true
|
|
33
|
+
}
|
|
34
|
+
));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function showCompactBanner() {
|
|
38
|
+
console.log(` ${chalk.hex('#8b5cf6').bold('🪐 Ultra-Dex')} ${chalk.dim('v3.2.0')}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function showWelcome() {
|
|
42
|
+
showBanner();
|
|
43
|
+
}
|
package/lib/commands/build.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ultra-dex build command
|
|
2
|
+
* ultra-dex build command
|
|
3
3
|
* Auto-Pilot: Finds the next pending task and executes it using Agents.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -10,6 +10,8 @@ import path from 'path';
|
|
|
10
10
|
import { loadState } from './plan.js';
|
|
11
11
|
import { runAgentLoop } from './run.js';
|
|
12
12
|
import { createProvider, getDefaultProvider, checkConfiguredProviders } from '../providers/index.js';
|
|
13
|
+
import { showProgress } from '../utils/progress.js';
|
|
14
|
+
import { getRandomMessage } from '../utils/messages.js';
|
|
13
15
|
|
|
14
16
|
async function readProjectContext() {
|
|
15
17
|
const context = {};
|
|
@@ -27,21 +29,21 @@ export function registerBuildCommand(program) {
|
|
|
27
29
|
.option('-k, --key <apiKey>', 'API key')
|
|
28
30
|
.option('--dry-run', 'Preview the task without executing')
|
|
29
31
|
.action(async (options) => {
|
|
30
|
-
console.log(chalk.cyan('\n
|
|
31
|
-
|
|
32
|
+
console.log(chalk.cyan('\n⚡ Ultra-Dex Auto-Pilot\n'));
|
|
33
|
+
|
|
32
34
|
// Check for API key
|
|
33
35
|
const configured = checkConfiguredProviders();
|
|
34
36
|
const hasProvider = configured.some(p => p.configured) || options.key;
|
|
35
37
|
|
|
36
38
|
if (!hasProvider && !options.dryRun) {
|
|
37
|
-
console.log(chalk.yellow('⚠️ No
|
|
39
|
+
console.log(chalk.yellow('⚠️ No API keys found.'));
|
|
38
40
|
console.log(chalk.white('Set an API key to enable Auto-Pilot.'));
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
const state = await loadState();
|
|
43
45
|
if (!state) {
|
|
44
|
-
console.log(chalk.red('❌ No state found. Run "ultra-dex init" first.'));
|
|
46
|
+
console.log(chalk.red('❌ No project state found. Run "ultra-dex init" first.'));
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -59,12 +61,12 @@ export function registerBuildCommand(program) {
|
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
if (!nextTask) {
|
|
62
|
-
console.log(chalk.green('✅ All phases completed!
|
|
64
|
+
console.log(chalk.green('✅ All phases completed! The project is ready.'));
|
|
63
65
|
return;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
// Show Progress
|
|
69
|
+
showProgress([`Phase: ${currentPhase.name}`, `Target: ${nextTask.task}`]);
|
|
68
70
|
|
|
69
71
|
// Heuristic to pick agent (naive)
|
|
70
72
|
let agentName = 'backend'; // default
|
|
@@ -74,7 +76,7 @@ export function registerBuildCommand(program) {
|
|
|
74
76
|
if (taskLower.includes('plan') || taskLower.includes('break down')) agentName = 'planner';
|
|
75
77
|
if (taskLower.includes('test')) agentName = 'testing';
|
|
76
78
|
|
|
77
|
-
console.log(chalk.gray(`
|
|
79
|
+
console.log(chalk.gray(`Activating Agent: @${agentName}`));
|
|
78
80
|
|
|
79
81
|
if (options.dryRun) {
|
|
80
82
|
console.log(chalk.yellow('\nDry run mode. Exiting.'));
|
|
@@ -87,14 +89,21 @@ export function registerBuildCommand(program) {
|
|
|
87
89
|
|
|
88
90
|
console.log(chalk.gray('─'.repeat(50)));
|
|
89
91
|
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
const spinner = ora(getRandomMessage('loading')).start();
|
|
93
|
+
try {
|
|
94
|
+
const result = await runAgentLoop(agentName, nextTask.task, provider, context);
|
|
95
|
+
spinner.succeed(chalk.green('Task execution completed'));
|
|
96
|
+
|
|
97
|
+
// Save output
|
|
98
|
+
const filename = `task-${nextTask.id}-${agentName}.md`;
|
|
99
|
+
await fs.writeFile(filename, result);
|
|
100
|
+
console.log(chalk.green(`\n✅ Task output saved to ${filename}`));
|
|
101
|
+
console.log(chalk.gray('Review the code and mark the task as completed in .ultra/state.json'));
|
|
102
|
+
} catch (error) {
|
|
103
|
+
spinner.fail(chalk.red('Task execution failed'));
|
|
104
|
+
console.error(error);
|
|
105
|
+
}
|
|
97
106
|
});
|
|
98
107
|
}
|
|
99
108
|
|
|
100
|
-
export default { registerBuildCommand };
|
|
109
|
+
export default { registerBuildCommand };
|