vigthoria-cli 1.10.47 → 1.10.48

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 (55) hide show
  1. package/dist/commands/auth.js +51 -68
  2. package/dist/commands/bridge.js +12 -19
  3. package/dist/commands/cancel.js +15 -22
  4. package/dist/commands/chat.d.ts +28 -0
  5. package/dist/commands/config.js +33 -73
  6. package/dist/commands/deploy.js +83 -123
  7. package/dist/commands/device.js +21 -61
  8. package/dist/commands/edit.js +32 -39
  9. package/dist/commands/explain.js +18 -25
  10. package/dist/commands/fork.d.ts +17 -0
  11. package/dist/commands/fork.js +164 -0
  12. package/dist/commands/generate.js +37 -44
  13. package/dist/commands/history.d.ts +17 -0
  14. package/dist/commands/history.js +113 -0
  15. package/dist/commands/hub.js +95 -102
  16. package/dist/commands/index.js +41 -46
  17. package/dist/commands/legion.js +146 -186
  18. package/dist/commands/preview.d.ts +55 -0
  19. package/dist/commands/preview.js +467 -0
  20. package/dist/commands/replay.d.ts +18 -0
  21. package/dist/commands/replay.js +156 -0
  22. package/dist/commands/repo.d.ts +97 -0
  23. package/dist/commands/repo.js +773 -0
  24. package/dist/commands/review.js +29 -36
  25. package/dist/commands/security.js +5 -12
  26. package/dist/commands/update.d.ts +9 -0
  27. package/dist/commands/update.js +201 -0
  28. package/dist/commands/wallet.js +28 -35
  29. package/dist/commands/workflow.js +13 -20
  30. package/dist/index.d.ts +21 -0
  31. package/dist/index.js +1826 -0
  32. package/dist/utils/api.d.ts +572 -0
  33. package/dist/utils/api.js +6629 -0
  34. package/dist/utils/brain-hub-client.js +1 -5
  35. package/dist/utils/bridge-client.js +11 -52
  36. package/dist/utils/cli-state.d.ts +54 -0
  37. package/dist/utils/cli-state.js +185 -0
  38. package/dist/utils/codebase-indexer.js +4 -41
  39. package/dist/utils/config.d.ts +85 -0
  40. package/dist/utils/config.js +267 -0
  41. package/dist/utils/context-ranker.js +15 -21
  42. package/dist/utils/files.js +5 -42
  43. package/dist/utils/logger.js +42 -50
  44. package/dist/utils/persona.js +3 -8
  45. package/dist/utils/post-write-validator.js +22 -29
  46. package/dist/utils/project-memory.js +16 -23
  47. package/dist/utils/session.d.ts +118 -0
  48. package/dist/utils/session.js +423 -0
  49. package/dist/utils/task-display.js +13 -20
  50. package/dist/utils/tools.d.ts +276 -0
  51. package/dist/utils/tools.js +3522 -0
  52. package/dist/utils/workspace-brain-service.js +8 -45
  53. package/dist/utils/workspace-cache.js +18 -26
  54. package/dist/utils/workspace-stream.js +21 -63
  55. package/package.json +1 -1
@@ -1,18 +1,12 @@
1
- "use strict";
2
1
  /**
3
2
  * Vigthoria CLI - Hub/Marketplace Commands
4
3
  *
5
4
  * In-flow marketplace discovery and module activation
6
5
  * Enables pay-as-you-go module usage directly from the terminal
7
6
  */
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.HubCommand = void 0;
13
- const chalk_1 = __importDefault(require("chalk"));
7
+ import chalk from 'chalk';
14
8
  const API_BASE = 'https://api.vigthoria.io';
15
- class HubCommand {
9
+ export class HubCommand {
16
10
  config;
17
11
  logger;
18
12
  constructor(config, logger) {
@@ -23,7 +17,7 @@ class HubCommand {
23
17
  * Search for modules by natural language query
24
18
  */
25
19
  async search(query) {
26
- console.log(chalk_1.default.cyan('\nšŸ” Searching Vigthoria Module Hub...\n'));
20
+ console.log(chalk.cyan('\nšŸ” Searching Vigthoria Module Hub...\n'));
27
21
  try {
28
22
  const response = await fetch(`${API_BASE}/api/modules/search`, {
29
23
  method: 'POST',
@@ -37,37 +31,37 @@ class HubCommand {
37
31
  }
38
32
  const data = await response.json();
39
33
  if (data.results.length === 0) {
40
- console.log(chalk_1.default.yellow('No modules found matching your query.'));
41
- console.log(chalk_1.default.gray('Try: vigthoria hub list to see all available modules\n'));
34
+ console.log(chalk.yellow('No modules found matching your query.'));
35
+ console.log(chalk.gray('Try: vigthoria hub list to see all available modules\n'));
42
36
  return;
43
37
  }
44
- console.log(chalk_1.default.green(`Found ${data.results.length} module(s):\n`));
38
+ console.log(chalk.green(`Found ${data.results.length} module(s):\n`));
45
39
  data.results.forEach((module, index) => {
46
- const statusColor = module.status === 'active' ? chalk_1.default.green : chalk_1.default.gray;
47
- console.log(chalk_1.default.bold.white(` ${index + 1}. ${module.name}`));
48
- console.log(chalk_1.default.gray(` ${module.description.substring(0, 80)}...`));
49
- console.log(chalk_1.default.cyan(` šŸ’° ${module.pricing.example}`));
40
+ const statusColor = module.status === 'active' ? chalk.green : chalk.gray;
41
+ console.log(chalk.bold.white(` ${index + 1}. ${module.name}`));
42
+ console.log(chalk.gray(` ${module.description.substring(0, 80)}...`));
43
+ console.log(chalk.cyan(` šŸ’° ${module.pricing.example}`));
50
44
  console.log(statusColor(` šŸ“Š Status: ${module.status.toUpperCase()}`));
51
- console.log(chalk_1.default.gray(` šŸ”— ${module.documentation}`));
45
+ console.log(chalk.gray(` šŸ”— ${module.documentation}`));
52
46
  console.log();
53
47
  });
54
48
  if (data.suggestion) {
55
- console.log(chalk_1.default.cyan(`šŸ’” ${data.suggestion}`));
49
+ console.log(chalk.cyan(`šŸ’” ${data.suggestion}`));
56
50
  }
57
- console.log(chalk_1.default.gray('\nTo activate a module: vigthoria hub activate <module-name>'));
58
- console.log(chalk_1.default.gray('Example: vigthoria hub activate music\n'));
51
+ console.log(chalk.gray('\nTo activate a module: vigthoria hub activate <module-name>'));
52
+ console.log(chalk.gray('Example: vigthoria hub activate music\n'));
59
53
  }
60
54
  catch (error) {
61
55
  const errMsg = error instanceof Error ? error.message : 'Unknown error';
62
- console.log(chalk_1.default.red(`Error: ${errMsg}`));
63
- console.log(chalk_1.default.gray('Make sure you have an active internet connection.'));
56
+ console.log(chalk.red(`Error: ${errMsg}`));
57
+ console.log(chalk.gray('Make sure you have an active internet connection.'));
64
58
  }
65
59
  }
66
60
  /**
67
61
  * List all available modules
68
62
  */
69
63
  async list(options) {
70
- console.log(chalk_1.default.cyan('\nšŸ“¦ Vigthoria Module Hub\n'));
64
+ console.log(chalk.cyan('\nšŸ“¦ Vigthoria Module Hub\n'));
71
65
  try {
72
66
  let url = `${API_BASE}/api/modules`;
73
67
  if (options.category) {
@@ -75,7 +69,7 @@ class HubCommand {
75
69
  }
76
70
  const response = await fetch(url);
77
71
  const data = await response.json();
78
- console.log(chalk_1.default.bold.white('Available Modules:\n'));
72
+ console.log(chalk.bold.white('Available Modules:\n'));
79
73
  // Group by category
80
74
  const grouped = data.modules.reduce((acc, module) => {
81
75
  if (!acc[module.category])
@@ -84,25 +78,25 @@ class HubCommand {
84
78
  return acc;
85
79
  }, {});
86
80
  Object.entries(grouped).forEach(([category, modules]) => {
87
- console.log(chalk_1.default.cyan.bold(` ${category.toUpperCase()}`));
88
- console.log(chalk_1.default.gray(' ' + '─'.repeat(50)));
81
+ console.log(chalk.cyan.bold(` ${category.toUpperCase()}`));
82
+ console.log(chalk.gray(' ' + '─'.repeat(50)));
89
83
  modules.forEach((module) => {
90
- console.log(chalk_1.default.white(` šŸ“¦ ${module.name.padEnd(25)} ${chalk_1.default.gray(module.id)}`));
91
- console.log(chalk_1.default.gray(` ${module.description.substring(0, 60)}...`));
92
- console.log(chalk_1.default.yellow(` ${module.pricing.example}`));
84
+ console.log(chalk.white(` šŸ“¦ ${module.name.padEnd(25)} ${chalk.gray(module.id)}`));
85
+ console.log(chalk.gray(` ${module.description.substring(0, 60)}...`));
86
+ console.log(chalk.yellow(` ${module.pricing.example}`));
93
87
  console.log();
94
88
  });
95
89
  });
96
- console.log(chalk_1.default.gray('─'.repeat(60)));
97
- console.log(chalk_1.default.cyan('\nCommands:'));
98
- console.log(chalk_1.default.gray(' vigthoria hub search "generate music" - Semantic search'));
99
- console.log(chalk_1.default.gray(' vigthoria hub activate <module> - Activate module'));
100
- console.log(chalk_1.default.gray(' vigthoria hub active - Show active modules'));
101
- console.log(chalk_1.default.gray(' vigthoria hub info <module> - Module details\n'));
90
+ console.log(chalk.gray('─'.repeat(60)));
91
+ console.log(chalk.cyan('\nCommands:'));
92
+ console.log(chalk.gray(' vigthoria hub search "generate music" - Semantic search'));
93
+ console.log(chalk.gray(' vigthoria hub activate <module> - Activate module'));
94
+ console.log(chalk.gray(' vigthoria hub active - Show active modules'));
95
+ console.log(chalk.gray(' vigthoria hub info <module> - Module details\n'));
102
96
  }
103
97
  catch (error) {
104
98
  const errMsg = error instanceof Error ? error.message : 'Unknown error';
105
- console.log(chalk_1.default.red(`Error: ${errMsg}`));
99
+ console.log(chalk.red(`Error: ${errMsg}`));
106
100
  }
107
101
  }
108
102
  /**
@@ -111,10 +105,10 @@ class HubCommand {
111
105
  async activate(moduleId) {
112
106
  const authToken = this.config.get('authToken');
113
107
  if (!authToken) {
114
- console.log(chalk_1.default.red('\nāŒ Not authenticated. Run: vigthoria login\n'));
108
+ console.log(chalk.red('\nāŒ Not authenticated. Run: vigthoria login\n'));
115
109
  return;
116
110
  }
117
- console.log(chalk_1.default.cyan(`\nšŸ”Œ Activating module: ${moduleId}...\n`));
111
+ console.log(chalk.cyan(`\nšŸ”Œ Activating module: ${moduleId}...\n`));
118
112
  try {
119
113
  const response = await fetch(`${API_BASE}/api/modules/${moduleId}/activate`, {
120
114
  method: 'POST',
@@ -128,27 +122,27 @@ class HubCommand {
128
122
  throw new Error(errorData.error || response.statusText);
129
123
  }
130
124
  const data = await response.json();
131
- console.log(chalk_1.default.green(`āœ… ${data.message}`));
125
+ console.log(chalk.green(`āœ… ${data.message}`));
132
126
  console.log();
133
- console.log(chalk_1.default.white('šŸ“š Documentation:'));
134
- console.log(chalk_1.default.gray(` ${data.documentation}`));
127
+ console.log(chalk.white('šŸ“š Documentation:'));
128
+ console.log(chalk.gray(` ${data.documentation}`));
135
129
  console.log();
136
- console.log(chalk_1.default.white('šŸ”— Available Endpoints:'));
130
+ console.log(chalk.white('šŸ”— Available Endpoints:'));
137
131
  data.endpoints.forEach((ep) => {
138
- console.log(chalk_1.default.gray(` ${ep.method.padEnd(6)} ${ep.path}`));
139
- console.log(chalk_1.default.gray(` ${ep.description}`));
132
+ console.log(chalk.gray(` ${ep.method.padEnd(6)} ${ep.path}`));
133
+ console.log(chalk.gray(` ${ep.description}`));
140
134
  });
141
135
  console.log();
142
- console.log(chalk_1.default.cyan('šŸ’” Quick Start:'));
143
- console.log(chalk_1.default.gray(` Use your API key in requests:`));
144
- console.log(chalk_1.default.gray(` Authorization: Bearer ${authToken.substring(0, 8)}...`));
136
+ console.log(chalk.cyan('šŸ’” Quick Start:'));
137
+ console.log(chalk.gray(` Use your API key in requests:`));
138
+ console.log(chalk.gray(` Authorization: Bearer ${authToken.substring(0, 8)}...`));
145
139
  console.log();
146
140
  }
147
141
  catch (error) {
148
142
  const errMsg = error instanceof Error ? error.message : 'Unknown error';
149
- console.log(chalk_1.default.red(`āŒ Activation failed: ${errMsg}`));
150
- console.log(chalk_1.default.gray('\nMake sure the module ID is correct.'));
151
- console.log(chalk_1.default.gray('Run: vigthoria hub list to see available modules.'));
143
+ console.log(chalk.red(`āŒ Activation failed: ${errMsg}`));
144
+ console.log(chalk.gray('\nMake sure the module ID is correct.'));
145
+ console.log(chalk.gray('Run: vigthoria hub list to see available modules.'));
152
146
  }
153
147
  }
154
148
  /**
@@ -157,10 +151,10 @@ class HubCommand {
157
151
  async active() {
158
152
  const authToken = this.config.get('authToken');
159
153
  if (!authToken) {
160
- console.log(chalk_1.default.red('\nāŒ Not authenticated. Run: vigthoria login\n'));
154
+ console.log(chalk.red('\nāŒ Not authenticated. Run: vigthoria login\n'));
161
155
  return;
162
156
  }
163
- console.log(chalk_1.default.cyan('\nšŸ“¦ Your Active Modules\n'));
157
+ console.log(chalk.cyan('\nšŸ“¦ Your Active Modules\n'));
164
158
  try {
165
159
  const response = await fetch(`${API_BASE}/api/modules/active`, {
166
160
  headers: {
@@ -172,117 +166,116 @@ class HubCommand {
172
166
  }
173
167
  const data = await response.json();
174
168
  if (data.allAccess) {
175
- console.log(chalk_1.default.green('🌟 You have access to ALL modules!\n'));
169
+ console.log(chalk.green('🌟 You have access to ALL modules!\n'));
176
170
  }
177
- console.log(chalk_1.default.white(`Tier: ${chalk_1.default.cyan.bold(data.tier.toUpperCase())}`));
171
+ console.log(chalk.white(`Tier: ${chalk.cyan.bold(data.tier.toUpperCase())}`));
178
172
  console.log();
179
173
  if (data.activeModules.length === 0) {
180
- console.log(chalk_1.default.yellow('No modules activated yet.'));
181
- console.log(chalk_1.default.gray('\nActivate modules with: vigthoria hub activate <module>'));
174
+ console.log(chalk.yellow('No modules activated yet.'));
175
+ console.log(chalk.gray('\nActivate modules with: vigthoria hub activate <module>'));
182
176
  }
183
177
  else {
184
- console.log(chalk_1.default.white('Active modules:'));
178
+ console.log(chalk.white('Active modules:'));
185
179
  data.activeModules.forEach((module) => {
186
- console.log(chalk_1.default.green(` āœ… ${module.name}`));
187
- console.log(chalk_1.default.gray(` Endpoint: ${module.endpoint}`));
188
- console.log(chalk_1.default.yellow(` Cost: ${module.pricing.example}`));
180
+ console.log(chalk.green(` āœ… ${module.name}`));
181
+ console.log(chalk.gray(` Endpoint: ${module.endpoint}`));
182
+ console.log(chalk.yellow(` Cost: ${module.pricing.example}`));
189
183
  console.log();
190
184
  });
191
185
  }
192
186
  }
193
187
  catch (error) {
194
188
  const errMsg = error instanceof Error ? error.message : 'Unknown error';
195
- console.log(chalk_1.default.red(`Error: ${errMsg}`));
189
+ console.log(chalk.red(`Error: ${errMsg}`));
196
190
  }
197
191
  }
198
192
  /**
199
193
  * Get detailed info about a specific module
200
194
  */
201
195
  async info(moduleId) {
202
- console.log(chalk_1.default.cyan(`\nšŸ“– Module Info: ${moduleId}\n`));
196
+ console.log(chalk.cyan(`\nšŸ“– Module Info: ${moduleId}\n`));
203
197
  try {
204
198
  const response = await fetch(`${API_BASE}/api/modules/${moduleId}`);
205
199
  if (!response.ok) {
206
200
  throw new Error('Module not found');
207
201
  }
208
202
  const module = await response.json();
209
- console.log(chalk_1.default.bold.white(`${module.name}`));
210
- console.log(chalk_1.default.gray('─'.repeat(50)));
203
+ console.log(chalk.bold.white(`${module.name}`));
204
+ console.log(chalk.gray('─'.repeat(50)));
211
205
  console.log();
212
- console.log(chalk_1.default.white('Description:'));
213
- console.log(chalk_1.default.gray(` ${module.description}`));
206
+ console.log(chalk.white('Description:'));
207
+ console.log(chalk.gray(` ${module.description}`));
214
208
  console.log();
215
- console.log(chalk_1.default.white('Category:'), chalk_1.default.cyan(module.category));
216
- console.log(chalk_1.default.white('Tags:'), chalk_1.default.gray(module.tags.join(', ')));
209
+ console.log(chalk.white('Category:'), chalk.cyan(module.category));
210
+ console.log(chalk.white('Tags:'), chalk.gray(module.tags.join(', ')));
217
211
  console.log();
218
- console.log(chalk_1.default.white('šŸ’° Pricing:'));
219
- console.log(chalk_1.default.yellow(` ${module.pricing.example}`));
220
- console.log(chalk_1.default.gray(` Billed per ${module.pricing.unit}`));
212
+ console.log(chalk.white('šŸ’° Pricing:'));
213
+ console.log(chalk.yellow(` ${module.pricing.example}`));
214
+ console.log(chalk.gray(` Billed per ${module.pricing.unit}`));
221
215
  console.log();
222
216
  if (module.rateLimits) {
223
- console.log(chalk_1.default.white('šŸ“Š Rate Limits:'));
217
+ console.log(chalk.white('šŸ“Š Rate Limits:'));
224
218
  Object.entries(module.rateLimits).forEach(([tier, limit]) => {
225
- console.log(chalk_1.default.gray(` ${tier.padEnd(12)} ${limit} requests/minute`));
219
+ console.log(chalk.gray(` ${tier.padEnd(12)} ${limit} requests/minute`));
226
220
  });
227
221
  console.log();
228
222
  }
229
223
  if (module.endpoints) {
230
- console.log(chalk_1.default.white('šŸ”— Endpoints:'));
224
+ console.log(chalk.white('šŸ”— Endpoints:'));
231
225
  module.endpoints.forEach((ep) => {
232
- console.log(chalk_1.default.cyan(` ${ep.method.padEnd(6)} ${ep.path}`));
233
- console.log(chalk_1.default.gray(` ${ep.description}`));
226
+ console.log(chalk.cyan(` ${ep.method.padEnd(6)} ${ep.path}`));
227
+ console.log(chalk.gray(` ${ep.description}`));
234
228
  });
235
229
  console.log();
236
230
  }
237
231
  // Show code examples if available
238
232
  if (module.codeExamples && Object.keys(module.codeExamples).length > 0) {
239
- console.log(chalk_1.default.white('šŸ“ Code Examples:'));
233
+ console.log(chalk.white('šŸ“ Code Examples:'));
240
234
  if (module.codeExamples.curl) {
241
- console.log(chalk_1.default.cyan('\n cURL:'));
242
- console.log(chalk_1.default.gray(' ' + module.codeExamples.curl.split('\n').join('\n ')));
235
+ console.log(chalk.cyan('\n cURL:'));
236
+ console.log(chalk.gray(' ' + module.codeExamples.curl.split('\n').join('\n ')));
243
237
  }
244
238
  if (module.codeExamples.node) {
245
- console.log(chalk_1.default.cyan('\n Node.js:'));
246
- console.log(chalk_1.default.gray(' ' + module.codeExamples.node.split('\n').join('\n ')));
239
+ console.log(chalk.cyan('\n Node.js:'));
240
+ console.log(chalk.gray(' ' + module.codeExamples.node.split('\n').join('\n ')));
247
241
  }
248
242
  }
249
243
  console.log();
250
- console.log(chalk_1.default.gray(`Documentation: ${module.documentation}`));
244
+ console.log(chalk.gray(`Documentation: ${module.documentation}`));
251
245
  if (module.external) {
252
- console.log(chalk_1.default.gray(`External URL: ${module.external}`));
246
+ console.log(chalk.gray(`External URL: ${module.external}`));
253
247
  }
254
248
  console.log();
255
- console.log(chalk_1.default.cyan('To activate: ') + chalk_1.default.white(`vigthoria hub activate ${moduleId}`));
249
+ console.log(chalk.cyan('To activate: ') + chalk.white(`vigthoria hub activate ${moduleId}`));
256
250
  console.log();
257
251
  }
258
252
  catch (error) {
259
253
  const errMsg = error instanceof Error ? error.message : 'Unknown error';
260
- console.log(chalk_1.default.red(`Error: ${errMsg}`));
261
- console.log(chalk_1.default.gray('\nAvailable modules: pay, meet, llm, music, voice, images'));
254
+ console.log(chalk.red(`Error: ${errMsg}`));
255
+ console.log(chalk.gray('\nAvailable modules: pay, meet, llm, music, voice, images'));
262
256
  }
263
257
  }
264
258
  /**
265
259
  * Interactive discover mode - prompts user with suggestions
266
260
  */
267
261
  async discover() {
268
- console.log(chalk_1.default.cyan('\nšŸš€ Vigthoria Module Discovery\n'));
269
- console.log(chalk_1.default.white('What are you building? Describe your project:\n'));
262
+ console.log(chalk.cyan('\nšŸš€ Vigthoria Module Discovery\n'));
263
+ console.log(chalk.white('What are you building? Describe your project:\n'));
270
264
  // Show common use cases
271
- console.log(chalk_1.default.gray('Examples of what you can build:'));
272
- console.log(chalk_1.default.gray(' • "I need background music for my app"'));
273
- console.log(chalk_1.default.gray(' • "voice narration for videos"'));
274
- console.log(chalk_1.default.gray(' • "AI chatbot for customer support"'));
275
- console.log(chalk_1.default.gray(' • "payment processing for my SaaS"'));
276
- console.log(chalk_1.default.gray(' • "image generation for social media"\n'));
277
- console.log(chalk_1.default.cyan('Use: vigthoria hub search "<your use case>"'));
278
- console.log(chalk_1.default.gray('The AI will find the best modules for your needs.\n'));
265
+ console.log(chalk.gray('Examples of what you can build:'));
266
+ console.log(chalk.gray(' • "I need background music for my app"'));
267
+ console.log(chalk.gray(' • "voice narration for videos"'));
268
+ console.log(chalk.gray(' • "AI chatbot for customer support"'));
269
+ console.log(chalk.gray(' • "payment processing for my SaaS"'));
270
+ console.log(chalk.gray(' • "image generation for social media"\n'));
271
+ console.log(chalk.cyan('Use: vigthoria hub search "<your use case>"'));
272
+ console.log(chalk.gray('The AI will find the best modules for your needs.\n'));
279
273
  // Show pricing tiers
280
- console.log(chalk_1.default.white('šŸ’³ Subscription Tiers:'));
281
- console.log(chalk_1.default.gray(' Starter €49/mo 50 credits'));
282
- console.log(chalk_1.default.gray(' Business €199/mo 500 credits'));
283
- console.log(chalk_1.default.gray(' Enterprise €499/mo 2000 credits'));
274
+ console.log(chalk.white('šŸ’³ Subscription Tiers:'));
275
+ console.log(chalk.gray(' Starter €49/mo 50 credits'));
276
+ console.log(chalk.gray(' Business €199/mo 500 credits'));
277
+ console.log(chalk.gray(' Enterprise €499/mo 2000 credits'));
284
278
  console.log();
285
- console.log(chalk_1.default.cyan('Get started: https://landing.vigthoria.io/api-keys.html\n'));
279
+ console.log(chalk.cyan('Get started: https://landing.vigthoria.io/api-keys.html\n'));
286
280
  }
287
281
  }
288
- exports.HubCommand = HubCommand;
@@ -1,26 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configureCommands = exports.setupCommands = void 0;
4
- exports.resolveCommand = resolveCommand;
5
- exports.registerCommands = registerCommands;
6
- const auth_js_1 = require("./auth.js");
7
- const bridge_js_1 = require("./bridge.js");
8
- const cancel_js_1 = require("./cancel.js");
9
- const chat_js_1 = require("./chat.js");
10
- const config_js_1 = require("./config.js");
11
- const deploy_js_1 = require("./deploy.js");
12
- const edit_js_1 = require("./edit.js");
13
- const explain_js_1 = require("./explain.js");
14
- const fork_js_1 = require("./fork.js");
15
- const generate_js_1 = require("./generate.js");
16
- const history_js_1 = require("./history.js");
17
- const hub_js_1 = require("./hub.js");
18
- const legion_js_1 = require("./legion.js");
19
- const preview_js_1 = require("./preview.js");
20
- const replay_js_1 = require("./replay.js");
21
- const repo_js_1 = require("./repo.js");
22
- const review_js_1 = require("./review.js");
23
- const workflow_js_1 = require("./workflow.js");
1
+ import { registerAuthCommands } from './auth.js';
2
+ import { BridgeCommand } from './bridge.js';
3
+ import { CancelCommand } from './cancel.js';
4
+ import { ChatCommand } from './chat.js';
5
+ import { ConfigCommand } from './config.js';
6
+ import { DeployCommand } from './deploy.js';
7
+ import { EditCommand } from './edit.js';
8
+ import { ExplainCommand } from './explain.js';
9
+ import { ForkCommand } from './fork.js';
10
+ import { GenerateCommand } from './generate.js';
11
+ import { HistoryCommand } from './history.js';
12
+ import { HubCommand } from './hub.js';
13
+ import { LegionCommand } from './legion.js';
14
+ import { PreviewCommand } from './preview.js';
15
+ import { ReplayCommand } from './replay.js';
16
+ import { RepoCommand } from './repo.js';
17
+ import { ReviewCommand } from './review.js';
18
+ import { WorkflowCommand } from './workflow.js';
24
19
  function isRegisterableCommand(value) {
25
20
  return Boolean(value && typeof value === 'object');
26
21
  }
@@ -71,75 +66,75 @@ function registerVersionInfoCommand(program) {
71
66
  const commandRegistry = [
72
67
  {
73
68
  name: 'auth',
74
- handler: auth_js_1.registerAuthCommands,
69
+ handler: registerAuthCommands,
75
70
  },
76
71
  {
77
72
  name: 'chat',
78
- handler: createClassRegistrar(chat_js_1.ChatCommand),
73
+ handler: createClassRegistrar(ChatCommand),
79
74
  },
80
75
  {
81
76
  name: 'edit',
82
- handler: createClassRegistrar(edit_js_1.EditCommand),
77
+ handler: createClassRegistrar(EditCommand),
83
78
  },
84
79
  {
85
80
  name: 'generate',
86
- handler: createClassRegistrar(generate_js_1.GenerateCommand),
81
+ handler: createClassRegistrar(GenerateCommand),
87
82
  },
88
83
  {
89
84
  name: 'explain',
90
- handler: createClassRegistrar(explain_js_1.ExplainCommand),
85
+ handler: createClassRegistrar(ExplainCommand),
91
86
  },
92
87
  {
93
88
  name: 'config',
94
- handler: createClassRegistrar(config_js_1.ConfigCommand),
89
+ handler: createClassRegistrar(ConfigCommand),
95
90
  },
96
91
  {
97
92
  name: 'review',
98
- handler: createClassRegistrar(review_js_1.ReviewCommand),
93
+ handler: createClassRegistrar(ReviewCommand),
99
94
  },
100
95
  {
101
96
  name: 'hub',
102
- handler: createClassRegistrar(hub_js_1.HubCommand),
97
+ handler: createClassRegistrar(HubCommand),
103
98
  },
104
99
  {
105
100
  name: 'repo',
106
- handler: createClassRegistrar(repo_js_1.RepoCommand),
101
+ handler: createClassRegistrar(RepoCommand),
107
102
  },
108
103
  {
109
104
  name: 'deploy',
110
- handler: createClassRegistrar(deploy_js_1.DeployCommand),
105
+ handler: createClassRegistrar(DeployCommand),
111
106
  },
112
107
  {
113
108
  name: 'bridge',
114
- handler: createClassRegistrar(bridge_js_1.BridgeCommand),
109
+ handler: createClassRegistrar(BridgeCommand),
115
110
  },
116
111
  {
117
112
  name: 'workflow',
118
- handler: createClassRegistrar(workflow_js_1.WorkflowCommand),
113
+ handler: createClassRegistrar(WorkflowCommand),
119
114
  },
120
115
  {
121
116
  name: 'preview',
122
- handler: createClassRegistrar(preview_js_1.PreviewCommand),
117
+ handler: createClassRegistrar(PreviewCommand),
123
118
  },
124
119
  {
125
120
  name: 'legion',
126
- handler: createClassRegistrar(legion_js_1.LegionCommand),
121
+ handler: createClassRegistrar(LegionCommand),
127
122
  },
128
123
  {
129
124
  name: 'history',
130
- handler: createClassRegistrar(history_js_1.HistoryCommand),
125
+ handler: createClassRegistrar(HistoryCommand),
131
126
  },
132
127
  {
133
128
  name: 'replay',
134
- handler: createClassRegistrar(replay_js_1.ReplayCommand),
129
+ handler: createClassRegistrar(ReplayCommand),
135
130
  },
136
131
  {
137
132
  name: 'fork',
138
- handler: createClassRegistrar(fork_js_1.ForkCommand),
133
+ handler: createClassRegistrar(ForkCommand),
139
134
  },
140
135
  {
141
136
  name: 'cancel',
142
- handler: createClassRegistrar(cancel_js_1.CancelCommand),
137
+ handler: createClassRegistrar(CancelCommand),
143
138
  },
144
139
  {
145
140
  name: 'doctor',
@@ -160,7 +155,7 @@ function commandNameMatches(entry, requestedName) {
160
155
  }
161
156
  return Boolean(entry.aliases?.some((alias) => normalizeCommandName(alias) === requestedName));
162
157
  }
163
- function resolveCommand(name) {
158
+ export function resolveCommand(name) {
164
159
  const requestedName = normalizeCommandName(name);
165
160
  if (!requestedName) {
166
161
  return null;
@@ -168,7 +163,7 @@ function resolveCommand(name) {
168
163
  const entry = commandRegistry.find((candidate) => commandNameMatches(candidate, requestedName));
169
164
  return entry?.handler ?? null;
170
165
  }
171
- function registerCommands(cli) {
166
+ export function registerCommands(cli) {
172
167
  if (!cli || typeof cli.command !== 'function') {
173
168
  throw new Error('registerCommands requires a Commander-compatible CLI instance');
174
169
  }
@@ -177,6 +172,6 @@ function registerCommands(cli) {
177
172
  entry.handler(program);
178
173
  }
179
174
  }
180
- exports.setupCommands = registerCommands;
181
- exports.configureCommands = registerCommands;
182
- exports.default = registerCommands;
175
+ export const setupCommands = registerCommands;
176
+ export const configureCommands = registerCommands;
177
+ export default registerCommands;