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.
Files changed (52) hide show
  1. package/README.md +79 -74
  2. package/assets/code-patterns/clerk-middleware.ts +138 -0
  3. package/assets/code-patterns/prisma-schema.prisma +224 -0
  4. package/assets/code-patterns/rls-policies.sql +246 -0
  5. package/assets/code-patterns/server-actions.ts +191 -0
  6. package/assets/code-patterns/trpc-router.ts +258 -0
  7. package/assets/cursor-rules/13-ai-integration.mdc +155 -0
  8. package/assets/cursor-rules/14-server-components.mdc +81 -0
  9. package/assets/cursor-rules/15-server-actions.mdc +102 -0
  10. package/assets/cursor-rules/16-edge-middleware.mdc +105 -0
  11. package/assets/cursor-rules/17-streaming-ssr.mdc +138 -0
  12. package/bin/ultra-dex.js +50 -1
  13. package/lib/commands/agents.js +16 -13
  14. package/lib/commands/banner.js +43 -21
  15. package/lib/commands/build.js +26 -17
  16. package/lib/commands/cloud.js +780 -0
  17. package/lib/commands/doctor.js +98 -79
  18. package/lib/commands/exec.js +434 -0
  19. package/lib/commands/generate.js +19 -16
  20. package/lib/commands/github.js +475 -0
  21. package/lib/commands/init.js +52 -56
  22. package/lib/commands/scaffold.js +151 -0
  23. package/lib/commands/search.js +477 -0
  24. package/lib/commands/serve.js +15 -13
  25. package/lib/commands/state.js +43 -70
  26. package/lib/commands/swarm.js +31 -9
  27. package/lib/config/theme.js +47 -0
  28. package/lib/mcp/client.js +502 -0
  29. package/lib/providers/agent-sdk.js +630 -0
  30. package/lib/providers/anthropic-agents.js +580 -0
  31. package/lib/templates/code/clerk-middleware.ts +138 -0
  32. package/lib/templates/code/prisma-schema.prisma +224 -0
  33. package/lib/templates/code/rls-policies.sql +246 -0
  34. package/lib/templates/code/server-actions.ts +191 -0
  35. package/lib/templates/code/trpc-router.ts +258 -0
  36. package/lib/themes/doomsday.js +229 -0
  37. package/lib/ui/index.js +5 -0
  38. package/lib/ui/interface.js +241 -0
  39. package/lib/ui/spinners.js +116 -0
  40. package/lib/ui/theme.js +183 -0
  41. package/lib/utils/agents.js +32 -0
  42. package/lib/utils/browser.js +373 -0
  43. package/lib/utils/help.js +64 -0
  44. package/lib/utils/messages.js +35 -0
  45. package/lib/utils/progress.js +24 -0
  46. package/lib/utils/prompts.js +47 -0
  47. package/lib/utils/spinners.js +46 -0
  48. package/lib/utils/status.js +31 -0
  49. package/lib/utils/tables.js +41 -0
  50. package/lib/utils/theme-state.js +9 -0
  51. package/lib/utils/version-display.js +32 -0
  52. package/package.json +19 -4
@@ -1,21 +1,43 @@
1
- export const banner = `
2
- ╔═══════════════════════════════════════════════════════════╗
3
- ║ ║
4
- ║ ██╗ ██╗██╗ ████████╗██████╗ █████╗ ║
5
- ║ ██║ ██║██║ ╚══██╔══╝██╔══██╗██╔══██╗ ║
6
- ║ ██║ ██║██║ ██║ ██████╔╝███████║ ║
7
- ║ ██║ ██║██║ ██║ ██╔══██╗██╔══██║ ║
8
- ╚██████╔╝███████╗██║ ██║ ██║██║ ██║ ║
9
- ║ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ║
10
- ║ ║
11
- ██████╗ ███████╗██╗ ██╗ ║
12
- ██╔══██╗██╔════╝╚██╗██╔╝ ║
13
- ██║ ██║█████╗ ╚███╔╝ ║
14
- ║ ██║ ██║██╔══╝ ██╔██╗ ║
15
- ║ ██████╔╝███████╗██╔╝ ██╗ ║
16
- ║ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ║
17
- ║ ║
18
- ║ From Idea to Production-Ready SaaS ║
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
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ultra-dex build command (GOD MODE)
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\u{1F30B} Ultra-Dex Auto-Pilot (Build Mode)\n'));
31
-
32
+ console.log(chalk.cyan('\nUltra-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 AI provider configured.'));
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! You are ready to launch.'));
64
+ console.log(chalk.green('✅ All phases completed! The project is ready.'));
63
65
  return;
64
66
  }
65
67
 
66
- console.log(chalk.bold(`Phase: ${currentPhase.name}`));
67
- console.log(chalk.bold(`Task: ${nextTask.task}`));
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(`Selected Agent: @${agentName}`));
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 result = await runAgentLoop(agentName, nextTask.task, provider, context);
91
-
92
- // Save output
93
- const filename = `task-${nextTask.id}-${agentName}.md`;
94
- await fs.writeFile(filename, result);
95
- console.log(chalk.green(`\n✅ Task output saved to ${filename}`));
96
- console.log(chalk.gray('Review the code and mark the task as completed in .ultra/state.json'));
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 };