@agents-at-scale/ark 0.1.35 → 0.1.36

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 (167) hide show
  1. package/dist/arkServices.d.ts +42 -0
  2. package/dist/arkServices.js +138 -0
  3. package/dist/arkServices.spec.d.ts +1 -0
  4. package/dist/arkServices.spec.js +24 -0
  5. package/dist/commands/agents/index.d.ts +3 -0
  6. package/dist/commands/agents/index.js +65 -0
  7. package/dist/commands/agents/index.spec.d.ts +1 -0
  8. package/dist/commands/agents/index.spec.js +67 -0
  9. package/dist/commands/chat/index.d.ts +3 -0
  10. package/dist/commands/chat/index.js +29 -0
  11. package/dist/commands/cluster/get.d.ts +2 -0
  12. package/dist/commands/cluster/get.js +39 -0
  13. package/dist/commands/cluster/get.spec.d.ts +1 -0
  14. package/dist/commands/cluster/get.spec.js +92 -0
  15. package/dist/commands/cluster/index.d.ts +2 -1
  16. package/dist/commands/cluster/index.js +3 -5
  17. package/dist/commands/cluster/index.spec.d.ts +1 -0
  18. package/dist/commands/cluster/index.spec.js +24 -0
  19. package/dist/commands/completion/index.d.ts +3 -0
  20. package/dist/commands/completion/index.js +230 -0
  21. package/dist/commands/completion/index.spec.d.ts +1 -0
  22. package/dist/commands/completion/index.spec.js +34 -0
  23. package/dist/commands/config/index.d.ts +3 -0
  24. package/dist/commands/config/index.js +42 -0
  25. package/dist/commands/config/index.spec.d.ts +1 -0
  26. package/dist/commands/config/index.spec.js +78 -0
  27. package/dist/commands/dashboard/index.d.ts +4 -0
  28. package/dist/commands/dashboard/index.js +39 -0
  29. package/dist/commands/docs/index.d.ts +4 -0
  30. package/dist/commands/docs/index.js +18 -0
  31. package/dist/commands/generate/config.js +5 -24
  32. package/dist/commands/generate/generators/mcpserver.d.ts +2 -1
  33. package/dist/commands/generate/generators/mcpserver.js +26 -5
  34. package/dist/commands/generate/generators/project.js +22 -41
  35. package/dist/commands/generate/index.d.ts +2 -1
  36. package/dist/commands/generate/index.js +1 -1
  37. package/dist/commands/install/index.d.ts +8 -0
  38. package/dist/commands/install/index.js +295 -0
  39. package/dist/commands/install/index.spec.d.ts +1 -0
  40. package/dist/commands/install/index.spec.js +143 -0
  41. package/dist/commands/models/create.d.ts +1 -0
  42. package/dist/commands/models/create.js +213 -0
  43. package/dist/commands/models/create.spec.d.ts +1 -0
  44. package/dist/commands/models/create.spec.js +125 -0
  45. package/dist/commands/models/index.d.ts +3 -0
  46. package/dist/commands/models/index.js +75 -0
  47. package/dist/commands/models/index.spec.d.ts +1 -0
  48. package/dist/commands/models/index.spec.js +96 -0
  49. package/dist/commands/query/index.d.ts +3 -0
  50. package/dist/commands/query/index.js +24 -0
  51. package/dist/commands/query/index.spec.d.ts +1 -0
  52. package/dist/commands/query/index.spec.js +53 -0
  53. package/dist/commands/routes/index.d.ts +3 -0
  54. package/dist/commands/routes/index.js +93 -0
  55. package/dist/commands/status/index.d.ts +3 -0
  56. package/dist/commands/status/index.js +281 -0
  57. package/dist/commands/targets/index.d.ts +3 -0
  58. package/dist/commands/targets/index.js +72 -0
  59. package/dist/commands/targets/index.spec.d.ts +1 -0
  60. package/dist/commands/targets/index.spec.js +154 -0
  61. package/dist/commands/teams/index.d.ts +3 -0
  62. package/dist/commands/teams/index.js +64 -0
  63. package/dist/commands/teams/index.spec.d.ts +1 -0
  64. package/dist/commands/teams/index.spec.js +70 -0
  65. package/dist/commands/tools/index.d.ts +3 -0
  66. package/dist/commands/tools/index.js +49 -0
  67. package/dist/commands/tools/index.spec.d.ts +1 -0
  68. package/dist/commands/tools/index.spec.js +70 -0
  69. package/dist/commands/uninstall/index.d.ts +3 -0
  70. package/dist/commands/uninstall/index.js +101 -0
  71. package/dist/commands/uninstall/index.spec.d.ts +1 -0
  72. package/dist/commands/uninstall/index.spec.js +125 -0
  73. package/dist/components/ChatUI.d.ts +16 -0
  74. package/dist/components/ChatUI.js +801 -0
  75. package/dist/components/statusChecker.d.ts +14 -24
  76. package/dist/components/statusChecker.js +295 -129
  77. package/dist/index.d.ts +1 -1
  78. package/dist/index.js +42 -42
  79. package/dist/lib/arkApiClient.d.ts +53 -0
  80. package/dist/lib/arkApiClient.js +102 -0
  81. package/dist/lib/arkApiProxy.d.ts +9 -0
  82. package/dist/lib/arkApiProxy.js +22 -0
  83. package/dist/lib/arkServiceProxy.d.ts +14 -0
  84. package/dist/lib/arkServiceProxy.js +95 -0
  85. package/dist/lib/arkStatus.d.ts +10 -0
  86. package/dist/lib/arkStatus.js +79 -0
  87. package/dist/lib/arkStatus.spec.d.ts +1 -0
  88. package/dist/lib/arkStatus.spec.js +49 -0
  89. package/dist/lib/chatClient.d.ts +33 -0
  90. package/dist/lib/chatClient.js +93 -0
  91. package/dist/lib/cluster.d.ts +2 -1
  92. package/dist/lib/cluster.js +37 -16
  93. package/dist/lib/cluster.spec.d.ts +1 -0
  94. package/dist/lib/cluster.spec.js +338 -0
  95. package/dist/lib/commands.d.ts +16 -0
  96. package/dist/lib/commands.js +29 -0
  97. package/dist/lib/commands.spec.d.ts +1 -0
  98. package/dist/lib/commands.spec.js +146 -0
  99. package/dist/lib/config.d.ts +26 -80
  100. package/dist/lib/config.js +70 -205
  101. package/dist/lib/config.spec.d.ts +1 -0
  102. package/dist/lib/config.spec.js +99 -0
  103. package/dist/lib/errors.js +1 -1
  104. package/dist/lib/errors.spec.d.ts +1 -0
  105. package/dist/lib/errors.spec.js +221 -0
  106. package/dist/lib/executeQuery.d.ts +20 -0
  107. package/dist/lib/executeQuery.js +135 -0
  108. package/dist/lib/executeQuery.spec.d.ts +1 -0
  109. package/dist/lib/executeQuery.spec.js +170 -0
  110. package/dist/lib/nextSteps.d.ts +4 -0
  111. package/dist/lib/nextSteps.js +20 -0
  112. package/dist/lib/nextSteps.spec.d.ts +1 -0
  113. package/dist/lib/nextSteps.spec.js +59 -0
  114. package/dist/lib/output.d.ts +36 -0
  115. package/dist/lib/output.js +89 -0
  116. package/dist/lib/output.spec.d.ts +1 -0
  117. package/dist/lib/output.spec.js +123 -0
  118. package/dist/lib/startup.d.ts +9 -0
  119. package/dist/lib/startup.js +87 -0
  120. package/dist/lib/startup.spec.d.ts +1 -0
  121. package/dist/lib/startup.spec.js +152 -0
  122. package/dist/lib/types.d.ts +87 -3
  123. package/dist/lib/versions.d.ts +23 -0
  124. package/dist/lib/versions.js +51 -0
  125. package/dist/types/types.d.ts +40 -0
  126. package/dist/types/types.js +1 -0
  127. package/dist/ui/AgentSelector.d.ts +8 -0
  128. package/dist/ui/AgentSelector.js +53 -0
  129. package/dist/ui/MainMenu.d.ts +5 -1
  130. package/dist/ui/MainMenu.js +226 -91
  131. package/dist/ui/ModelSelector.d.ts +8 -0
  132. package/dist/ui/ModelSelector.js +53 -0
  133. package/dist/ui/TeamSelector.d.ts +8 -0
  134. package/dist/ui/TeamSelector.js +55 -0
  135. package/dist/ui/ToolSelector.d.ts +8 -0
  136. package/dist/ui/ToolSelector.js +53 -0
  137. package/dist/ui/statusFormatter.d.ts +22 -7
  138. package/dist/ui/statusFormatter.js +39 -39
  139. package/dist/ui/statusFormatter.spec.d.ts +1 -0
  140. package/dist/ui/statusFormatter.spec.js +58 -0
  141. package/package.json +16 -5
  142. package/dist/commands/cluster/get-ip.d.ts +0 -2
  143. package/dist/commands/cluster/get-ip.js +0 -32
  144. package/dist/commands/cluster/get-type.d.ts +0 -2
  145. package/dist/commands/cluster/get-type.js +0 -26
  146. package/dist/commands/completion.d.ts +0 -2
  147. package/dist/commands/completion.js +0 -108
  148. package/dist/commands/config.d.ts +0 -5
  149. package/dist/commands/config.js +0 -327
  150. package/dist/components/DashboardCLI.d.ts +0 -3
  151. package/dist/components/DashboardCLI.js +0 -149
  152. package/dist/config.d.ts +0 -42
  153. package/dist/config.js +0 -243
  154. package/dist/lib/arkClient.d.ts +0 -32
  155. package/dist/lib/arkClient.js +0 -43
  156. package/dist/lib/consts.d.ts +0 -10
  157. package/dist/lib/consts.js +0 -15
  158. package/dist/lib/exec.d.ts +0 -5
  159. package/dist/lib/exec.js +0 -20
  160. package/dist/lib/gatewayManager.d.ts +0 -24
  161. package/dist/lib/gatewayManager.js +0 -85
  162. package/dist/lib/kubernetes.d.ts +0 -28
  163. package/dist/lib/kubernetes.js +0 -122
  164. package/dist/lib/progress.d.ts +0 -128
  165. package/dist/lib/progress.js +0 -273
  166. package/dist/lib/wrappers/git.d.ts +0 -2
  167. package/dist/lib/wrappers/git.js +0 -43
@@ -1,128 +0,0 @@
1
- /**
2
- * Progress indicators and user experience utilities for ARK CLI
3
- */
4
- export interface ProgressStep {
5
- name: string;
6
- status: 'pending' | 'running' | 'completed' | 'failed' | 'skipped';
7
- message?: string;
8
- duration?: number;
9
- }
10
- export declare class ProgressIndicator {
11
- private title;
12
- private steps;
13
- private startTime;
14
- constructor(title: string);
15
- /**
16
- * Add a step to the progress indicator
17
- */
18
- addStep(name: string, message?: string): void;
19
- /**
20
- * Start a step
21
- */
22
- startStep(name: string, message?: string): void;
23
- /**
24
- * Complete a step
25
- */
26
- completeStep(name: string, message?: string): void;
27
- /**
28
- * Fail a step
29
- */
30
- failStep(name: string, message?: string): void;
31
- /**
32
- * Skip a step
33
- */
34
- skipStep(name: string, message?: string): void;
35
- /**
36
- * Render the current progress
37
- */
38
- private renderProgress;
39
- /**
40
- * Complete the progress indicator
41
- */
42
- complete(message?: string): void;
43
- /**
44
- * Get status icon for a step
45
- */
46
- private getStatusIcon;
47
- /**
48
- * Get status color for a step
49
- */
50
- private getStatusColor;
51
- }
52
- /**
53
- * Simple spinner for long-running operations
54
- */
55
- export declare class Spinner {
56
- private frames;
57
- private index;
58
- private interval;
59
- private message;
60
- constructor(message: string);
61
- start(): void;
62
- stop(finalMessage?: string): void;
63
- fail(errorMessage?: string): void;
64
- }
65
- /**
66
- * Enhanced prompts with better validation and user guidance
67
- */
68
- export declare class EnhancedPrompts {
69
- /**
70
- * Show a helpful tip to the user
71
- */
72
- static showTip(message: string): void;
73
- /**
74
- * Show a warning to the user
75
- */
76
- static showWarning(message: string): void;
77
- /**
78
- * Show information to the user
79
- */
80
- static showInfo(message: string): void;
81
- /**
82
- * Show a success message
83
- */
84
- static showSuccess(message: string): void;
85
- /**
86
- * Show available options for a choice
87
- */
88
- static showChoiceHelp(title: string, choices: Array<{
89
- name: string;
90
- description: string;
91
- }>): void;
92
- /**
93
- * Show next steps after completion
94
- */
95
- static showNextSteps(title: string, steps: string[]): void;
96
- /**
97
- * Show a separator for better visual organization
98
- */
99
- static showSeparator(title?: string): void;
100
- }
101
- /**
102
- * Utility for consistent formatting of output
103
- */
104
- export declare class OutputFormatter {
105
- /**
106
- * Format a list of key-value pairs
107
- */
108
- static formatKeyValueList(items: Array<{
109
- key: string;
110
- value: string;
111
- highlight?: boolean;
112
- }>): void;
113
- /**
114
- * Format a file list with icons
115
- */
116
- static formatFileList(files: Array<{
117
- path: string;
118
- type: 'file' | 'directory';
119
- description?: string;
120
- }>): void;
121
- /**
122
- * Format command examples
123
- */
124
- static formatCommands(title: string, commands: Array<{
125
- command: string;
126
- description: string;
127
- }>): void;
128
- }
@@ -1,273 +0,0 @@
1
- /**
2
- * Progress indicators and user experience utilities for ARK CLI
3
- */
4
- import chalk from 'chalk';
5
- export class ProgressIndicator {
6
- constructor(title) {
7
- this.title = title;
8
- this.steps = [];
9
- this.startTime = Date.now();
10
- console.log(chalk.blue(`\nšŸš€ ${this.title}\n`));
11
- }
12
- /**
13
- * Add a step to the progress indicator
14
- */
15
- addStep(name, message) {
16
- this.steps.push({
17
- name,
18
- status: 'pending',
19
- message,
20
- });
21
- }
22
- /**
23
- * Start a step
24
- */
25
- startStep(name, message) {
26
- const step = this.steps.find((s) => s.name === name);
27
- if (step) {
28
- step.status = 'running';
29
- step.message = message;
30
- this.renderProgress();
31
- }
32
- }
33
- /**
34
- * Complete a step
35
- */
36
- completeStep(name, message) {
37
- const step = this.steps.find((s) => s.name === name);
38
- if (step) {
39
- step.status = 'completed';
40
- step.message = message;
41
- this.renderProgress();
42
- }
43
- }
44
- /**
45
- * Fail a step
46
- */
47
- failStep(name, message) {
48
- const step = this.steps.find((s) => s.name === name);
49
- if (step) {
50
- step.status = 'failed';
51
- step.message = message;
52
- this.renderProgress();
53
- }
54
- }
55
- /**
56
- * Skip a step
57
- */
58
- skipStep(name, message) {
59
- const step = this.steps.find((s) => s.name === name);
60
- if (step) {
61
- step.status = 'skipped';
62
- step.message = message;
63
- this.renderProgress();
64
- }
65
- }
66
- /**
67
- * Render the current progress
68
- */
69
- renderProgress() {
70
- // Clear previous output (simple version)
71
- process.stdout.write('\r\x1b[K');
72
- for (const step of this.steps) {
73
- const icon = this.getStatusIcon(step.status);
74
- const color = this.getStatusColor(step.status);
75
- const statusText = step.message || step.name;
76
- console.log(`${icon} ${chalk[color](statusText)}`);
77
- }
78
- // Move cursor back up to overwrite on next update
79
- if (this.steps.length > 1) {
80
- process.stdout.write(`\x1b[${this.steps.length}A`);
81
- }
82
- }
83
- /**
84
- * Complete the progress indicator
85
- */
86
- complete(message) {
87
- // Clear any remaining progress rendering
88
- process.stdout.write('\r\x1b[K');
89
- // Only print failed or skipped steps - hide successful validation
90
- const importantSteps = this.steps.filter((step) => step.status === 'failed' || step.status === 'skipped');
91
- for (const step of importantSteps) {
92
- const icon = this.getStatusIcon(step.status);
93
- const color = this.getStatusColor(step.status);
94
- const statusText = step.message || step.name;
95
- console.log(`${icon} ${chalk[color](statusText)}`);
96
- }
97
- const duration = Date.now() - this.startTime;
98
- const durationText = duration > 1000 ? `${(duration / 1000).toFixed(1)}s` : `${duration}ms`;
99
- // Only show completion message if there were issues or if verbose
100
- if (importantSteps.length > 0) {
101
- console.log(chalk.green(`\nāœ… ${message || this.title} completed in ${durationText}\n`));
102
- }
103
- }
104
- /**
105
- * Get status icon for a step
106
- */
107
- getStatusIcon(status) {
108
- switch (status) {
109
- case 'pending':
110
- return chalk.gray('ā³');
111
- case 'running':
112
- return chalk.blue('šŸ”„');
113
- case 'completed':
114
- return chalk.green('āœ…');
115
- case 'failed':
116
- return chalk.red('āŒ');
117
- case 'skipped':
118
- return chalk.yellow('ā­ļø');
119
- default:
120
- return 'ā“';
121
- }
122
- }
123
- /**
124
- * Get status color for a step
125
- */
126
- getStatusColor(status) {
127
- switch (status) {
128
- case 'pending':
129
- return 'gray';
130
- case 'running':
131
- return 'blue';
132
- case 'completed':
133
- return 'green';
134
- case 'failed':
135
- return 'red';
136
- case 'skipped':
137
- return 'yellow';
138
- default:
139
- return 'gray';
140
- }
141
- }
142
- }
143
- /**
144
- * Simple spinner for long-running operations
145
- */
146
- export class Spinner {
147
- constructor(message) {
148
- this.frames = ['ā ‹', 'ā ™', 'ā ¹', 'ā ø', 'ā ¼', 'ā “', 'ā ¦', 'ā §', 'ā ‡', 'ā '];
149
- this.index = 0;
150
- this.interval = null;
151
- this.message = message;
152
- }
153
- start() {
154
- this.interval = setInterval(() => {
155
- process.stdout.write(`\r${chalk.blue(this.frames[this.index])} ${this.message}`);
156
- this.index = (this.index + 1) % this.frames.length;
157
- }, 100);
158
- }
159
- stop(finalMessage) {
160
- if (this.interval) {
161
- clearInterval(this.interval);
162
- this.interval = null;
163
- }
164
- process.stdout.write(`\r\x1b[K${finalMessage ? chalk.green(`āœ… ${finalMessage}`) : ''}\n`);
165
- }
166
- fail(errorMessage) {
167
- if (this.interval) {
168
- clearInterval(this.interval);
169
- this.interval = null;
170
- }
171
- process.stdout.write(`\r\x1b[K${errorMessage ? chalk.red(`āŒ ${errorMessage}`) : ''}\n`);
172
- }
173
- }
174
- /**
175
- * Enhanced prompts with better validation and user guidance
176
- */
177
- export class EnhancedPrompts {
178
- /**
179
- * Show a helpful tip to the user
180
- */
181
- static showTip(message) {
182
- console.log(chalk.cyan(`šŸ’” Tip: ${message}`));
183
- }
184
- /**
185
- * Show a warning to the user
186
- */
187
- static showWarning(message) {
188
- console.log(chalk.yellow(`āš ļø Warning: ${message}`));
189
- }
190
- /**
191
- * Show information to the user
192
- */
193
- static showInfo(message) {
194
- console.log(chalk.blue(`ā„¹ļø ${message}`));
195
- }
196
- /**
197
- * Show a success message
198
- */
199
- static showSuccess(message) {
200
- console.log(chalk.green(`āœ… ${message}`));
201
- }
202
- /**
203
- * Show available options for a choice
204
- */
205
- static showChoiceHelp(title, choices) {
206
- console.log(chalk.cyan(`\nšŸ“‹ ${title}:`));
207
- choices.forEach((choice) => {
208
- console.log(chalk.gray(` • ${chalk.white(choice.name)}: ${choice.description}`));
209
- });
210
- console.log();
211
- }
212
- /**
213
- * Show next steps after completion
214
- */
215
- static showNextSteps(title, steps) {
216
- console.log(chalk.cyan(`\nšŸ“‹ ${title}:`));
217
- steps.forEach((step, index) => {
218
- console.log(chalk.gray(` ${index + 1}. ${step}`));
219
- });
220
- console.log();
221
- }
222
- /**
223
- * Show a separator for better visual organization
224
- */
225
- static showSeparator(title) {
226
- if (title) {
227
- console.log(chalk.gray(`\n${'─'.repeat(50)}`));
228
- console.log(chalk.cyan(`${title}`));
229
- console.log(chalk.gray(`${'─'.repeat(50)}\n`));
230
- }
231
- else {
232
- console.log(chalk.gray(`${'─'.repeat(50)}`));
233
- }
234
- }
235
- }
236
- /**
237
- * Utility for consistent formatting of output
238
- */
239
- export class OutputFormatter {
240
- /**
241
- * Format a list of key-value pairs
242
- */
243
- static formatKeyValueList(items) {
244
- const maxKeyLength = Math.max(...items.map((item) => item.key.length));
245
- items.forEach((item) => {
246
- const paddedKey = item.key.padEnd(maxKeyLength);
247
- const color = item.highlight ? 'cyan' : 'gray';
248
- console.log(` ${chalk[color](paddedKey)}: ${chalk.white(item.value)}`);
249
- });
250
- }
251
- /**
252
- * Format a file list with icons
253
- */
254
- static formatFileList(files) {
255
- files.forEach((file) => {
256
- const icon = file.type === 'directory' ? 'šŸ“' : 'šŸ“„';
257
- const description = file.description
258
- ? chalk.gray(` - ${file.description}`)
259
- : '';
260
- console.log(` ${icon} ${chalk.white(file.path)}${description}`);
261
- });
262
- }
263
- /**
264
- * Format command examples
265
- */
266
- static formatCommands(title, commands) {
267
- console.log(chalk.cyan(`\n${title}:`));
268
- commands.forEach((cmd) => {
269
- console.log(` ${chalk.yellow(cmd.command)}`);
270
- console.log(chalk.gray(` ${cmd.description}\n`));
271
- });
272
- }
273
- }
@@ -1,2 +0,0 @@
1
- export declare function ensureInArkRepo(expectedRepoName: string, expectedRemoteSubstring?: string): Promise<void>;
2
- export declare function getRepoProjectRoot(): Promise<string>;
@@ -1,43 +0,0 @@
1
- import * as path from 'path';
2
- import chalk from 'chalk';
3
- import { simpleGit } from 'simple-git';
4
- import { ARK_REPO_ERROR_MESSAGE } from '../consts.js';
5
- // Initialize simple-git instance
6
- const git = simpleGit();
7
- export async function ensureInArkRepo(expectedRepoName, expectedRemoteSubstring) {
8
- try {
9
- // Get repository root
10
- const gitRoot = await git.revparse(['--show-toplevel']);
11
- if (path.basename(gitRoot) !== expectedRepoName) {
12
- console.error(chalk.red(ARK_REPO_ERROR_MESSAGE));
13
- process.exit(1);
14
- }
15
- if (expectedRemoteSubstring) {
16
- try {
17
- // Get remote URL
18
- const remoteUrl = await git.remote(['get-url', 'origin']);
19
- if (!remoteUrl || !remoteUrl.includes(expectedRemoteSubstring)) {
20
- console.error(chalk.red(ARK_REPO_ERROR_MESSAGE));
21
- process.exit(1);
22
- }
23
- }
24
- catch (_error) {
25
- console.error(chalk.red(ARK_REPO_ERROR_MESSAGE));
26
- process.exit(1);
27
- }
28
- }
29
- }
30
- catch (_error) {
31
- console.error(chalk.red(ARK_REPO_ERROR_MESSAGE));
32
- process.exit(1);
33
- }
34
- }
35
- export async function getRepoProjectRoot() {
36
- try {
37
- return await git.revparse(['--show-toplevel']);
38
- }
39
- catch (_error) {
40
- console.error(chalk.red('Failed to determine git repository root path'));
41
- process.exit(1);
42
- }
43
- }