ultra-dex 2.2.1 → 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 +112 -151
- package/assets/agents/00-AGENT_INDEX.md +1 -1
- 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/assets/docs/LAUNCH-POSTS.md +1 -1
- package/assets/docs/QUICK-REFERENCE.md +9 -4
- package/assets/docs/VISION-V2.md +1 -1
- package/assets/hooks/pre-commit +98 -0
- package/assets/saas-plan/04-Imp-Template.md +1 -1
- package/bin/ultra-dex.js +132 -4
- package/lib/commands/advanced.js +471 -0
- package/lib/commands/agent-builder.js +226 -0
- package/lib/commands/agents.js +102 -42
- package/lib/commands/auto-implement.js +68 -0
- package/lib/commands/banner.js +43 -21
- package/lib/commands/build.js +78 -183
- package/lib/commands/ci-monitor.js +84 -0
- package/lib/commands/config.js +207 -0
- package/lib/commands/dashboard.js +770 -0
- package/lib/commands/diff.js +233 -0
- package/lib/commands/doctor.js +416 -0
- package/lib/commands/export.js +408 -0
- package/lib/commands/fix.js +96 -0
- package/lib/commands/generate.js +105 -78
- package/lib/commands/hooks.js +251 -76
- package/lib/commands/init.js +102 -54
- package/lib/commands/memory.js +80 -0
- package/lib/commands/plan.js +82 -0
- package/lib/commands/review.js +34 -5
- package/lib/commands/run.js +233 -0
- package/lib/commands/scaffold.js +151 -0
- package/lib/commands/serve.js +179 -146
- package/lib/commands/state.js +327 -0
- package/lib/commands/swarm.js +306 -0
- package/lib/commands/sync.js +82 -23
- package/lib/commands/team.js +275 -0
- package/lib/commands/upgrade.js +190 -0
- package/lib/commands/validate.js +34 -0
- package/lib/commands/verify.js +81 -0
- package/lib/commands/watch.js +79 -0
- package/lib/config/theme.js +47 -0
- package/lib/mcp/graph.js +92 -0
- package/lib/mcp/memory.js +95 -0
- package/lib/mcp/resources.js +152 -0
- package/lib/mcp/server.js +34 -0
- package/lib/mcp/tools.js +481 -0
- package/lib/mcp/websocket.js +117 -0
- package/lib/providers/index.js +49 -4
- package/lib/providers/ollama.js +136 -0
- package/lib/providers/router.js +63 -0
- package/lib/quality/scanner.js +128 -0
- package/lib/swarm/coordinator.js +97 -0
- package/lib/swarm/index.js +598 -0
- package/lib/swarm/protocol.js +677 -0
- package/lib/swarm/tiers.js +485 -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/templates/custom-agent.md +10 -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/files.js +14 -0
- package/lib/utils/graph.js +108 -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 +31 -13
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
// Ultra-Dex Production Pattern: tRPC Router
|
|
2
|
+
// Copy to server/routers/ directory
|
|
3
|
+
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { TRPCError } from '@trpc/server';
|
|
6
|
+
import { router, publicProcedure, protectedProcedure, adminProcedure } from '../trpc';
|
|
7
|
+
import { prisma } from '@/lib/prisma';
|
|
8
|
+
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// USER ROUTER
|
|
11
|
+
// =============================================================================
|
|
12
|
+
|
|
13
|
+
export const userRouter = router({
|
|
14
|
+
// Get current user profile
|
|
15
|
+
me: protectedProcedure.query(async ({ ctx }) => {
|
|
16
|
+
const user = await prisma.user.findUnique({
|
|
17
|
+
where: { clerkId: ctx.userId },
|
|
18
|
+
include: {
|
|
19
|
+
organizationMemberships: {
|
|
20
|
+
include: { organization: true },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (!user) {
|
|
26
|
+
throw new TRPCError({ code: 'NOT_FOUND', message: 'User not found' });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return user;
|
|
30
|
+
}),
|
|
31
|
+
|
|
32
|
+
// Update current user profile
|
|
33
|
+
update: protectedProcedure
|
|
34
|
+
.input(
|
|
35
|
+
z.object({
|
|
36
|
+
name: z.string().min(2).optional(),
|
|
37
|
+
imageUrl: z.string().url().optional(),
|
|
38
|
+
})
|
|
39
|
+
)
|
|
40
|
+
.mutation(async ({ ctx, input }) => {
|
|
41
|
+
return prisma.user.update({
|
|
42
|
+
where: { clerkId: ctx.userId },
|
|
43
|
+
data: input,
|
|
44
|
+
});
|
|
45
|
+
}),
|
|
46
|
+
|
|
47
|
+
// List all users (admin only)
|
|
48
|
+
list: adminProcedure
|
|
49
|
+
.input(
|
|
50
|
+
z.object({
|
|
51
|
+
limit: z.number().min(1).max(100).default(50),
|
|
52
|
+
cursor: z.string().optional(),
|
|
53
|
+
})
|
|
54
|
+
)
|
|
55
|
+
.query(async ({ input }) => {
|
|
56
|
+
const users = await prisma.user.findMany({
|
|
57
|
+
take: input.limit + 1,
|
|
58
|
+
cursor: input.cursor ? { id: input.cursor } : undefined,
|
|
59
|
+
orderBy: { createdAt: 'desc' },
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
let nextCursor: string | undefined;
|
|
63
|
+
if (users.length > input.limit) {
|
|
64
|
+
const nextItem = users.pop();
|
|
65
|
+
nextCursor = nextItem!.id;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return { users, nextCursor };
|
|
69
|
+
}),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// =============================================================================
|
|
73
|
+
// PROJECT ROUTER
|
|
74
|
+
// =============================================================================
|
|
75
|
+
|
|
76
|
+
export const projectRouter = router({
|
|
77
|
+
// List projects for current organization
|
|
78
|
+
list: protectedProcedure
|
|
79
|
+
.input(
|
|
80
|
+
z.object({
|
|
81
|
+
organizationId: z.string(),
|
|
82
|
+
status: z.enum(['ACTIVE', 'ARCHIVED', 'COMPLETED']).optional(),
|
|
83
|
+
})
|
|
84
|
+
)
|
|
85
|
+
.query(async ({ ctx, input }) => {
|
|
86
|
+
// Verify user has access to organization
|
|
87
|
+
const membership = await prisma.organizationMember.findFirst({
|
|
88
|
+
where: {
|
|
89
|
+
organizationId: input.organizationId,
|
|
90
|
+
user: { clerkId: ctx.userId },
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
if (!membership) {
|
|
95
|
+
throw new TRPCError({ code: 'FORBIDDEN', message: 'Access denied' });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return prisma.project.findMany({
|
|
99
|
+
where: {
|
|
100
|
+
organizationId: input.organizationId,
|
|
101
|
+
...(input.status && { status: input.status }),
|
|
102
|
+
},
|
|
103
|
+
include: {
|
|
104
|
+
owner: { select: { name: true, imageUrl: true } },
|
|
105
|
+
_count: { select: { tasks: true } },
|
|
106
|
+
},
|
|
107
|
+
orderBy: { updatedAt: 'desc' },
|
|
108
|
+
});
|
|
109
|
+
}),
|
|
110
|
+
|
|
111
|
+
// Get single project
|
|
112
|
+
get: protectedProcedure
|
|
113
|
+
.input(z.object({ id: z.string() }))
|
|
114
|
+
.query(async ({ ctx, input }) => {
|
|
115
|
+
const project = await prisma.project.findUnique({
|
|
116
|
+
where: { id: input.id },
|
|
117
|
+
include: {
|
|
118
|
+
owner: true,
|
|
119
|
+
tasks: { orderBy: { createdAt: 'desc' } },
|
|
120
|
+
organization: true,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
if (!project) {
|
|
125
|
+
throw new TRPCError({ code: 'NOT_FOUND' });
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Verify access
|
|
129
|
+
const membership = await prisma.organizationMember.findFirst({
|
|
130
|
+
where: {
|
|
131
|
+
organizationId: project.organizationId,
|
|
132
|
+
user: { clerkId: ctx.userId },
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
if (!membership) {
|
|
137
|
+
throw new TRPCError({ code: 'FORBIDDEN' });
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return project;
|
|
141
|
+
}),
|
|
142
|
+
|
|
143
|
+
// Create project
|
|
144
|
+
create: protectedProcedure
|
|
145
|
+
.input(
|
|
146
|
+
z.object({
|
|
147
|
+
name: z.string().min(1).max(100),
|
|
148
|
+
description: z.string().max(500).optional(),
|
|
149
|
+
organizationId: z.string(),
|
|
150
|
+
})
|
|
151
|
+
)
|
|
152
|
+
.mutation(async ({ ctx, input }) => {
|
|
153
|
+
// Verify user has write access to organization
|
|
154
|
+
const membership = await prisma.organizationMember.findFirst({
|
|
155
|
+
where: {
|
|
156
|
+
organizationId: input.organizationId,
|
|
157
|
+
user: { clerkId: ctx.userId },
|
|
158
|
+
role: { in: ['OWNER', 'ADMIN', 'MEMBER'] },
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
if (!membership) {
|
|
163
|
+
throw new TRPCError({ code: 'FORBIDDEN' });
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const user = await prisma.user.findUnique({
|
|
167
|
+
where: { clerkId: ctx.userId },
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return prisma.project.create({
|
|
171
|
+
data: {
|
|
172
|
+
name: input.name,
|
|
173
|
+
description: input.description,
|
|
174
|
+
organizationId: input.organizationId,
|
|
175
|
+
ownerId: user!.id,
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
}),
|
|
179
|
+
|
|
180
|
+
// Update project
|
|
181
|
+
update: protectedProcedure
|
|
182
|
+
.input(
|
|
183
|
+
z.object({
|
|
184
|
+
id: z.string(),
|
|
185
|
+
name: z.string().min(1).max(100).optional(),
|
|
186
|
+
description: z.string().max(500).optional(),
|
|
187
|
+
status: z.enum(['ACTIVE', 'ARCHIVED', 'COMPLETED']).optional(),
|
|
188
|
+
})
|
|
189
|
+
)
|
|
190
|
+
.mutation(async ({ ctx, input }) => {
|
|
191
|
+
const { id, ...data } = input;
|
|
192
|
+
|
|
193
|
+
const project = await prisma.project.findUnique({
|
|
194
|
+
where: { id },
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
if (!project) {
|
|
198
|
+
throw new TRPCError({ code: 'NOT_FOUND' });
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Verify write access
|
|
202
|
+
const membership = await prisma.organizationMember.findFirst({
|
|
203
|
+
where: {
|
|
204
|
+
organizationId: project.organizationId,
|
|
205
|
+
user: { clerkId: ctx.userId },
|
|
206
|
+
role: { in: ['OWNER', 'ADMIN', 'MEMBER'] },
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
if (!membership) {
|
|
211
|
+
throw new TRPCError({ code: 'FORBIDDEN' });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return prisma.project.update({
|
|
215
|
+
where: { id },
|
|
216
|
+
data,
|
|
217
|
+
});
|
|
218
|
+
}),
|
|
219
|
+
|
|
220
|
+
// Delete project
|
|
221
|
+
delete: protectedProcedure
|
|
222
|
+
.input(z.object({ id: z.string() }))
|
|
223
|
+
.mutation(async ({ ctx, input }) => {
|
|
224
|
+
const project = await prisma.project.findUnique({
|
|
225
|
+
where: { id: input.id },
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
if (!project) {
|
|
229
|
+
throw new TRPCError({ code: 'NOT_FOUND' });
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Only owner/admin can delete
|
|
233
|
+
const membership = await prisma.organizationMember.findFirst({
|
|
234
|
+
where: {
|
|
235
|
+
organizationId: project.organizationId,
|
|
236
|
+
user: { clerkId: ctx.userId },
|
|
237
|
+
role: { in: ['OWNER', 'ADMIN'] },
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
if (!membership) {
|
|
242
|
+
throw new TRPCError({ code: 'FORBIDDEN' });
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return prisma.project.delete({ where: { id: input.id } });
|
|
246
|
+
}),
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
// =============================================================================
|
|
250
|
+
// ROOT ROUTER
|
|
251
|
+
// =============================================================================
|
|
252
|
+
|
|
253
|
+
export const appRouter = router({
|
|
254
|
+
user: userRouter,
|
|
255
|
+
project: projectRouter,
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
export type AppRouter = typeof appRouter;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import gradient from 'gradient-string';
|
|
2
|
+
import boxen from 'boxen';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
|
|
5
|
+
// --- Colors & Gradients ---
|
|
6
|
+
const doomsdayGradient = gradient(['#dc2626', '#7c3aed', '#ec4899']);
|
|
7
|
+
const infinityGradient = gradient(['#fbbf24', '#f59e0b', '#dc2626']);
|
|
8
|
+
|
|
9
|
+
// --- Banner ---
|
|
10
|
+
const epicBanner = `
|
|
11
|
+
██╗ ██╗██╗ ████████╗██████╗ █████╗ ██████╗ ███████╗██╗ ██╗
|
|
12
|
+
██║ ██║██║ ╚══██╔══╝██╔══██╗██╔══██╗ ██╔══██╗██╔════╝╚██╗██╔╝
|
|
13
|
+
██║ ██║██║ ██║ ██████╔╝███████║█████╗██║ ██║█████╗ ╚███╔╝
|
|
14
|
+
██║ ██║██║ ██║ ██╔══██╗██╔══██║╚════╝██║ ██║██╔══╝ ██╔██╗
|
|
15
|
+
╚██████╔╝███████╗██║ ██║ ██║██║ ██║ ██████╔╝███████╗██╔╝ ██╗
|
|
16
|
+
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝`;
|
|
17
|
+
|
|
18
|
+
const infinityGauntlet = `
|
|
19
|
+
╭━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╮
|
|
20
|
+
┃ ⟐ POWER ⟐ SPACE ⟐ REALITY ⟐ ┃
|
|
21
|
+
┃ ⟐ SOUL ⟐ TIME ⟐ MIND ⟐ ┃
|
|
22
|
+
╰━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╯`;
|
|
23
|
+
|
|
24
|
+
export function showBanner(version = '3.1.0') {
|
|
25
|
+
console.log(doomsdayGradient(epicBanner));
|
|
26
|
+
console.log(infinityGradient(infinityGauntlet));
|
|
27
|
+
console.log('');
|
|
28
|
+
console.log(boxen(
|
|
29
|
+
`${chalk.hex('#dc2626').bold('⚡ DOOMSDAY EDITION ⚡')}\n\n` +
|
|
30
|
+
`${chalk.hex('#7c3aed')('The Multiverse of Code has a new defender')}\n\n` +
|
|
31
|
+
`${chalk.hex('#fbbf24')('v' + version)} • ${chalk.dim('Snap your fingers... ship to production')}`,
|
|
32
|
+
{
|
|
33
|
+
padding: 1,
|
|
34
|
+
margin: 1,
|
|
35
|
+
borderStyle: 'double',
|
|
36
|
+
borderColor: '#dc2626',
|
|
37
|
+
title: '🔥 ULTRA-DEX',
|
|
38
|
+
titleAlignment: 'center'
|
|
39
|
+
}
|
|
40
|
+
));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// --- Status Icons ---
|
|
44
|
+
export const stones = {
|
|
45
|
+
power: chalk.hex('#ec4899')('◆'),
|
|
46
|
+
space: chalk.hex('#3b82f6')('◆'),
|
|
47
|
+
reality: chalk.hex('#ef4444')('◆'),
|
|
48
|
+
soul: chalk.hex('#f97316')('◆'),
|
|
49
|
+
time: chalk.hex('#22c55e')('◆'),
|
|
50
|
+
mind: chalk.hex('#eab308')('◆')
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const icons = {
|
|
54
|
+
success: chalk.hex('#22c55e')('✦'),
|
|
55
|
+
error: chalk.hex('#dc2626')('✖'),
|
|
56
|
+
warning: chalk.hex('#eab308')('⚠'),
|
|
57
|
+
info: chalk.hex('#3b82f6')('ℹ'),
|
|
58
|
+
running: chalk.hex('#ec4899')('⟳'),
|
|
59
|
+
complete: chalk.hex('#fbbf24')('★'),
|
|
60
|
+
snap: chalk.hex('#7c3aed')('✵')
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export function showInfinityStatus() {
|
|
64
|
+
console.log('');
|
|
65
|
+
console.log(` ${stones.power} Power ${stones.space} Space ${stones.reality} Reality`);
|
|
66
|
+
console.log(` ${stones.soul} Soul ${stones.time} Time ${stones.mind} Mind`);
|
|
67
|
+
console.log('');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// --- Agents ---
|
|
71
|
+
export const avengersAgents = {
|
|
72
|
+
cto: { name: 'IRON MAN', emoji: '🤖', tagline: 'I am the architecture' },
|
|
73
|
+
planner: { name: 'NICK FURY', emoji: '👁️', tagline: 'I have a plan' },
|
|
74
|
+
research: { name: 'JARVIS', emoji: '🤖', tagline: 'Running analysis, sir' },
|
|
75
|
+
backend: { name: 'THOR', emoji: '⚡', tagline: 'Bring me the API!' },
|
|
76
|
+
frontend: { name: 'SPIDER-MAN', emoji: '🕷️', tagline: 'Web development, literally' },
|
|
77
|
+
database: { name: 'VISION', emoji: '💎', tagline: 'Data... must be preserved' },
|
|
78
|
+
auth: { name: 'BLACK PANTHER', emoji: '🐆', tagline: 'Wakanda authenticates forever' },
|
|
79
|
+
security: { name: 'CAPTAIN AMERICA', emoji: '🛡️', tagline: 'I can do this all day' },
|
|
80
|
+
devops: { name: 'WAR MACHINE', emoji: '🚀', tagline: 'Deploy the payload' },
|
|
81
|
+
testing: { name: 'ANT-MAN', emoji: '🐜', tagline: 'Testing at every scale' },
|
|
82
|
+
documentation: { name: 'BRUCE BANNER', emoji: '🧑🔬', tagline: 'Document everything... carefully' },
|
|
83
|
+
reviewer: { name: 'DOCTOR STRANGE', emoji: '🔮', tagline: 'I see 14 million code paths' },
|
|
84
|
+
debugger: { name: 'HAWKEYE', emoji: '🎯', tagline: 'I never miss a bug' },
|
|
85
|
+
performance: { name: 'QUICKSILVER', emoji: '💨', tagline: 'You didnt see that benchmark?' },
|
|
86
|
+
refactoring: { name: 'SCARLET WITCH', emoji: '🔴', tagline: 'Reality can be whatever I refactor' }
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// --- Progress ---
|
|
90
|
+
export function thanoSnap(tasks) {
|
|
91
|
+
const total = tasks.length;
|
|
92
|
+
let complete = 0;
|
|
93
|
+
|
|
94
|
+
console.log('');
|
|
95
|
+
console.log(chalk.hex('#7c3aed').bold(' ✵ INITIATING THE SNAP...'));
|
|
96
|
+
console.log('');
|
|
97
|
+
|
|
98
|
+
tasks.forEach((task, idx) => {
|
|
99
|
+
const stones = ['◆', '◆', '◆', '◆', '◆', '◆'];
|
|
100
|
+
const colors = ['#ec4899', '#3b82f6', '#ef4444', '#f97316', '#22c55e', '#eab308'];
|
|
101
|
+
|
|
102
|
+
// Light up stones as progress
|
|
103
|
+
let stoneDisplay = stones.map((s, i) => {
|
|
104
|
+
if (i <= Math.floor((idx / total) * 6)) {
|
|
105
|
+
return chalk.hex(colors[i])(s);
|
|
106
|
+
}
|
|
107
|
+
return chalk.dim(s);
|
|
108
|
+
}).join(' ');
|
|
109
|
+
|
|
110
|
+
console.log(` ${stoneDisplay} ${chalk.dim(task)}`);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
console.log('');
|
|
114
|
+
console.log(chalk.hex('#fbbf24').bold(' ★ PERFECTLY BALANCED, AS ALL CODE SHOULD BE.'));
|
|
115
|
+
console.log('');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function dustEffect() {
|
|
119
|
+
const particles = ['░', '▒', '▓', '█'];
|
|
120
|
+
console.log(chalk.hex('#7c3aed')(' ' + particles.map(p => p.repeat(10)).join('')));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// --- Help ---
|
|
124
|
+
export function showHelp() {
|
|
125
|
+
console.log('');
|
|
126
|
+
console.log(doomsdayGradient(' ═══════════════════════════════════════════════'));
|
|
127
|
+
console.log(doomsdayGradient(' ║ U L T R A - D E X : D O O M S D A Y'));
|
|
128
|
+
console.log(doomsdayGradient(' ═══════════════════════════════════════════════'));
|
|
129
|
+
console.log('');
|
|
130
|
+
|
|
131
|
+
const sections = [
|
|
132
|
+
{
|
|
133
|
+
title: '⚡ ASSEMBLE THE CODE',
|
|
134
|
+
commands:
|
|
135
|
+
[
|
|
136
|
+
['init', 'Initialize new universe'],
|
|
137
|
+
['generate', 'Create the plan (Thanos style)'],
|
|
138
|
+
['swarm', 'Assemble the Avengers']
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: '🛡️ DEFEND THE REALM',
|
|
143
|
+
commands:
|
|
144
|
+
[
|
|
145
|
+
['review', 'Doctor Strange code review'],
|
|
146
|
+
['validate', 'Shield integrity check'],
|
|
147
|
+
['hooks', 'Deploy perimeter defenses']
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
title: '💎 HARNESS INFINITY',
|
|
152
|
+
commands:
|
|
153
|
+
[
|
|
154
|
+
['serve', 'Open the multiverse portal'],
|
|
155
|
+
['dashboard', 'Monitor all realities'],
|
|
156
|
+
['agents', 'Summon your heroes']
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: '✵ THE SNAP',
|
|
161
|
+
commands:
|
|
162
|
+
[
|
|
163
|
+
['build', 'Snap to production'],
|
|
164
|
+
['deploy', 'Across all multiverses'],
|
|
165
|
+
['doctor', 'Reality stone diagnostics']
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
sections.forEach(section => {
|
|
171
|
+
console.log(` ${chalk.hex('#dc2626').bold(section.title)}`);
|
|
172
|
+
section.commands.forEach(([cmd, desc]) => {
|
|
173
|
+
console.log(` ${chalk.hex('#fbbf24')(cmd.padEnd(16))} ${chalk.dim(desc)}`);
|
|
174
|
+
});
|
|
175
|
+
console.log('');
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
console.log(chalk.dim(' "With great CLI comes great responsibility."'));
|
|
179
|
+
console.log('');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// --- Swarm ---
|
|
183
|
+
export function showSwarmAssemble(agents) {
|
|
184
|
+
console.log('');
|
|
185
|
+
console.log(chalk.hex('#dc2626').bold(' ⚡ A V E N G E R S . . . A S S E M B L E ! ⚡'));
|
|
186
|
+
console.log('');
|
|
187
|
+
|
|
188
|
+
agents.forEach((agent, idx) => {
|
|
189
|
+
const avenger = avengersAgents[agent.name] || { name: agent.name.toUpperCase(), emoji: '⚡', tagline: 'Ready for action' };
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
console.log(` ${avenger.emoji} ${chalk.hex('#fbbf24').bold(avenger.name)}`);
|
|
192
|
+
console.log(` ${chalk.dim('"' + avenger.tagline + '"')}`);
|
|
193
|
+
console.log('');
|
|
194
|
+
}, idx * 500);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// --- Messages ---
|
|
199
|
+
export const epicMessages = {
|
|
200
|
+
start: [
|
|
201
|
+
"The Multiverse awaits your command...",
|
|
202
|
+
"Reality Stone: Online. Let's bend some code.",
|
|
203
|
+
"Tony Stark: 'Part of the journey is the end... of bugs.'",
|
|
204
|
+
"Whatever it takes to ship this feature."
|
|
205
|
+
],
|
|
206
|
+
success: [
|
|
207
|
+
"★ Perfectly balanced, as all code should be.",
|
|
208
|
+
"⚡ This... does put a smile on my face.",
|
|
209
|
+
"🛡️ Avengers assembled. Mission complete.",
|
|
210
|
+
"💎 Inevitable. Just like your deployment."
|
|
211
|
+
],
|
|
212
|
+
error: [
|
|
213
|
+
"Reality is often disappointing... but this error is fixable.",
|
|
214
|
+
"I am... not impressed by this stack trace.",
|
|
215
|
+
"Mr. Stark, I don't feel so good about this bug...",
|
|
216
|
+
"The hardest errors require the strongest debuggers."
|
|
217
|
+
],
|
|
218
|
+
loading: [
|
|
219
|
+
"Opening multiverse portal...",
|
|
220
|
+
"Charging Infinity Stones...",
|
|
221
|
+
"Summoning the Avengers...",
|
|
222
|
+
"Snapping fingers metaphorically..."
|
|
223
|
+
]
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
export function getRandomMessage(type) {
|
|
227
|
+
const messages = epicMessages[type] || epicMessages.start;
|
|
228
|
+
return messages[Math.floor(Math.random() * messages.length)];
|
|
229
|
+
}
|
package/lib/ui/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Ultra-Dex CLI — UI Export Index
|
|
2
|
+
|
|
3
|
+
export { theme, box, divider, header, subheader, status, statusLine, table, progressBar, keyHints } from './theme.js';
|
|
4
|
+
export { showStartup, showMainInterface, showStatus, showAgentsList, showSwarmPipeline, showHelp } from './interface.js';
|
|
5
|
+
export { createSpinner, startLoading, succeed, fail, runTaskList, typeText, countdown } from './spinners.js';
|