wyrm-mcp 7.2.1 → 7.2.2

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 (150) hide show
  1. package/LICENSE +26 -667
  2. package/NOTICE +14 -33
  3. package/dist/activation.js +1 -60
  4. package/dist/agent-daemon.js +4 -281
  5. package/dist/agent-loop.js +7 -332
  6. package/dist/analytics.js +13 -236
  7. package/dist/attribution.js +1 -49
  8. package/dist/audit.js +2 -457
  9. package/dist/auto-capture.js +3 -138
  10. package/dist/auto-orchestrator.js +1 -325
  11. package/dist/autoconfig.js +39 -840
  12. package/dist/buddy-runner.js +1 -109
  13. package/dist/buddy.js +14 -564
  14. package/dist/build-flags.js +1 -17
  15. package/dist/capabilities.js +3 -183
  16. package/dist/capture.js +1 -56
  17. package/dist/causality.js +6 -107
  18. package/dist/cli.js +20 -281
  19. package/dist/cloud/cli.js +5 -541
  20. package/dist/cloud/client.js +1 -221
  21. package/dist/cloud/crypto.js +1 -85
  22. package/dist/cloud/machine-id.js +2 -113
  23. package/dist/cloud/recovery.js +1 -60
  24. package/dist/cloud/sync-engine.js +7 -543
  25. package/dist/cloud-backup.js +5 -579
  26. package/dist/cloud-profile.js +1 -138
  27. package/dist/cloud-sync-entrypoint.js +1 -47
  28. package/dist/cloud-sync.js +2 -309
  29. package/dist/constellation.js +12 -168
  30. package/dist/context-build-budgeted.js +4 -144
  31. package/dist/context-ranking.js +1 -69
  32. package/dist/crypto.js +1 -179
  33. package/dist/daemon-write-endpoint.js +1 -290
  34. package/dist/daemon-writer.js +2 -406
  35. package/dist/database.js +43 -1110
  36. package/dist/deprecations.js +2 -162
  37. package/dist/design.js +13 -141
  38. package/dist/event-replication.js +1 -112
  39. package/dist/events-sse.js +7 -43
  40. package/dist/events.js +6 -238
  41. package/dist/failure-patterns.js +42 -659
  42. package/dist/federation.js +12 -236
  43. package/dist/goals.js +13 -101
  44. package/dist/golden.js +3 -355
  45. package/dist/handlers/agent.js +4 -165
  46. package/dist/handlers/alias-adapters.js +1 -129
  47. package/dist/handlers/aliases.js +1 -171
  48. package/dist/handlers/audit.js +1 -87
  49. package/dist/handlers/boundary.js +1 -221
  50. package/dist/handlers/capture.js +73 -1109
  51. package/dist/handlers/causality.js +7 -114
  52. package/dist/handlers/cloud.js +85 -382
  53. package/dist/handlers/companion.js +28 -459
  54. package/dist/handlers/datalake.js +7 -187
  55. package/dist/handlers/dispatch-context.js +0 -22
  56. package/dist/handlers/entity.js +25 -256
  57. package/dist/handlers/events.js +16 -335
  58. package/dist/handlers/failure.js +13 -340
  59. package/dist/handlers/goals.js +4 -296
  60. package/dist/handlers/intelligence.js +126 -674
  61. package/dist/handlers/invoicing.js +1 -70
  62. package/dist/handlers/mcpclient.js +6 -137
  63. package/dist/handlers/orchestration.js +40 -125
  64. package/dist/handlers/output-schemas.js +1 -24
  65. package/dist/handlers/presence.js +3 -99
  66. package/dist/handlers/project.js +28 -182
  67. package/dist/handlers/prompts.js +6 -157
  68. package/dist/handlers/quest.js +4 -224
  69. package/dist/handlers/recall.js +11 -218
  70. package/dist/handlers/registry.js +1 -167
  71. package/dist/handlers/resources.js +1 -288
  72. package/dist/handlers/review.js +11 -74
  73. package/dist/handlers/run.js +17 -487
  74. package/dist/handlers/search.js +15 -326
  75. package/dist/handlers/session.js +28 -615
  76. package/dist/handlers/share.js +8 -184
  77. package/dist/handlers/shims.js +1 -464
  78. package/dist/handlers/skill.js +67 -449
  79. package/dist/handlers/survivors.js +1 -120
  80. package/dist/handlers/symbols.js +8 -109
  81. package/dist/handlers/syncops.js +4 -302
  82. package/dist/handlers/types.js +1 -27
  83. package/dist/harvest.js +5 -191
  84. package/dist/hours.js +7 -156
  85. package/dist/http-auth.js +3 -321
  86. package/dist/http-fast.js +21 -1137
  87. package/dist/icons.js +1 -47
  88. package/dist/index.js +2 -924
  89. package/dist/indexer.js +4 -145
  90. package/dist/intelligence.js +31 -261
  91. package/dist/internal-dispatch.js +3 -212
  92. package/dist/keyset.js +1 -110
  93. package/dist/knowledge-graph.js +12 -176
  94. package/dist/license.js +2 -441
  95. package/dist/logger.js +2 -199
  96. package/dist/maintenance.js +2 -148
  97. package/dist/mcp-client.js +6 -262
  98. package/dist/memory-artifacts.js +30 -449
  99. package/dist/migrate-prompt.js +2 -124
  100. package/dist/migrations.js +40 -655
  101. package/dist/performance.js +1 -228
  102. package/dist/presence.js +11 -140
  103. package/dist/priority-embed.js +5 -164
  104. package/dist/providers/embedding-provider.js +1 -196
  105. package/dist/readonly-gate.js +1 -29
  106. package/dist/rehydration.js +9 -157
  107. package/dist/reindex.js +1 -88
  108. package/dist/render-target.js +21 -514
  109. package/dist/render.js +4 -280
  110. package/dist/repl-guard.js +1 -173
  111. package/dist/replication-daemon-entrypoint.js +1 -31
  112. package/dist/replication-daemon.js +2 -262
  113. package/dist/resilience.js +1 -591
  114. package/dist/reverse-bridge.js +5 -360
  115. package/dist/security.js +1 -244
  116. package/dist/session-seen.js +3 -51
  117. package/dist/setup.js +1 -260
  118. package/dist/skill-author.js +5 -168
  119. package/dist/spec-kit.js +1 -191
  120. package/dist/sqlite-busy.js +1 -154
  121. package/dist/statusline.js +11 -315
  122. package/dist/sub-agent.js +13 -262
  123. package/dist/summarizer.js +13 -139
  124. package/dist/symbols.js +7 -283
  125. package/dist/sync.js +5 -359
  126. package/dist/tasks-dispatch.js +1 -84
  127. package/dist/tasks.js +1 -282
  128. package/dist/token-budget.js +1 -143
  129. package/dist/tool-analytics.js +7 -129
  130. package/dist/tool-annotations.js +1 -365
  131. package/dist/tool-manifest-v2.json +1 -1
  132. package/dist/tool-manifest.json +1 -1
  133. package/dist/tool-profiles.js +1 -75
  134. package/dist/trace-harvest.js +6 -244
  135. package/dist/types.js +1 -30
  136. package/dist/ui-dashboard.js +41 -50
  137. package/dist/ulid.js +1 -81
  138. package/dist/validate.js +1 -129
  139. package/dist/vault.js +1 -534
  140. package/dist/vectors.js +3 -184
  141. package/dist/version-check.js +4 -136
  142. package/dist/visibility.js +19 -155
  143. package/dist/wyrm-cli.js +98 -2464
  144. package/dist/wyrm-guard.js +14 -424
  145. package/dist/wyrm-loop.js +3 -150
  146. package/dist/wyrm-manifest.json +1 -1
  147. package/dist/wyrm-statusline-daemon.js +1 -11
  148. package/dist/wyrm-statusline.js +4 -56
  149. package/dist/wyrm-ui.js +9 -77
  150. package/package.json +4 -2
package/dist/cli.js CHANGED
@@ -1,281 +1,20 @@
1
- /**
2
- * Wyrm CLI - Beautiful command-line interface
3
- *
4
- * @copyright 2026 Ghost Protocol (Pvt) Ltd.
5
- * @license AGPL-3.0-or-later — dual-licensed; commercial terms: ghosts.lk@proton.me. See LICENSE.
6
- * @module cli
7
- * @version 3.0.0
8
- */
9
- // ANSI color codes
10
- export const colors = {
11
- // Reset
12
- reset: '\x1b[0m',
13
- // Styles
14
- bold: '\x1b[1m',
15
- dim: '\x1b[2m',
16
- italic: '\x1b[3m',
17
- underline: '\x1b[4m',
18
- // Colors
19
- black: '\x1b[30m',
20
- red: '\x1b[31m',
21
- green: '\x1b[32m',
22
- yellow: '\x1b[33m',
23
- blue: '\x1b[34m',
24
- magenta: '\x1b[35m',
25
- cyan: '\x1b[36m',
26
- white: '\x1b[37m',
27
- // Bright colors
28
- brightRed: '\x1b[91m',
29
- brightGreen: '\x1b[92m',
30
- brightYellow: '\x1b[93m',
31
- brightBlue: '\x1b[94m',
32
- brightMagenta: '\x1b[95m',
33
- brightCyan: '\x1b[96m',
34
- // Background
35
- bgRed: '\x1b[41m',
36
- bgGreen: '\x1b[42m',
37
- bgYellow: '\x1b[43m',
38
- bgBlue: '\x1b[44m',
39
- bgMagenta: '\x1b[45m',
40
- bgCyan: '\x1b[46m',
41
- };
42
- // Helper functions
43
- export const c = {
44
- bold: (s) => `${colors.bold}${s}${colors.reset}`,
45
- dim: (s) => `${colors.dim}${s}${colors.reset}`,
46
- red: (s) => `${colors.red}${s}${colors.reset}`,
47
- green: (s) => `${colors.green}${s}${colors.reset}`,
48
- yellow: (s) => `${colors.yellow}${s}${colors.reset}`,
49
- blue: (s) => `${colors.blue}${s}${colors.reset}`,
50
- magenta: (s) => `${colors.magenta}${s}${colors.reset}`,
51
- cyan: (s) => `${colors.cyan}${s}${colors.reset}`,
52
- primary: (s) => `${colors.brightMagenta}${s}${colors.reset}`,
53
- success: (s) => `${colors.brightGreen}${s}${colors.reset}`,
54
- warning: (s) => `${colors.brightYellow}${s}${colors.reset}`,
55
- error: (s) => `${colors.brightRed}${s}${colors.reset}`,
56
- };
57
- // Icons
58
- export const icons = {
59
- dragon: '󱅝',
60
- fire: '🔥',
61
- scroll: '📜',
62
- sword: '⚔️',
63
- shield: '🛡️',
64
- treasure: '💎',
65
- quest: '🎯',
66
- check: '✓',
67
- cross: '✗',
68
- arrow: '→',
69
- bullet: '•',
70
- star: '★',
71
- warning: '⚠️',
72
- error: '❌',
73
- success: '✅',
74
- info: 'ℹ️',
75
- clock: '🕐',
76
- folder: '📁',
77
- file: '📄',
78
- lock: '🔒',
79
- unlock: '🔓',
80
- sync: '🔄',
81
- search: '🔍',
82
- sparkle: '✨',
83
- };
84
- // Priority icons
85
- export const priorityIcons = {
86
- critical: '🔴',
87
- high: '🟠',
88
- medium: '🟡',
89
- low: '🟢',
90
- };
91
- // ASCII art banner
92
- export const BANNER = `
93
- ${colors.brightMagenta}██╗ ██╗██╗ ██╗██████╗ ███╗ ███╗${colors.reset}
94
- ${colors.brightMagenta}██║ ██║╚██╗ ██╔╝██╔══██╗████╗ ████║${colors.reset}
95
- ${colors.brightMagenta}██║ █╗ ██║ ╚████╔╝ ██████╔╝██╔████╔██║${colors.reset}
96
- ${colors.brightMagenta}██║███╗██║ ╚██╔╝ ██╔══██╗██║╚██╔╝██║${colors.reset}
97
- ${colors.brightMagenta}╚███╔███╔╝ ██║ ██║ ██║██║ ╚═╝ ██║${colors.reset}
98
- ${colors.brightMagenta} ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝${colors.reset}
99
- ${colors.dim} Persistent AI Memory System v3.0.0${colors.reset}
100
- ${colors.dim} ghosts.lk${colors.reset}
101
- `;
102
- export const MINI_BANNER = `${colors.brightMagenta}󱅝 Wyrm v3.0.0${colors.reset}`;
103
- /**
104
- * Progress spinner
105
- */
106
- export class Spinner {
107
- frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
108
- current = 0;
109
- interval = null;
110
- text;
111
- constructor(text = 'Loading...') {
112
- this.text = text;
113
- }
114
- start() {
115
- this.interval = setInterval(() => {
116
- process.stdout.write(`\r${colors.cyan}${this.frames[this.current]}${colors.reset} ${this.text}`);
117
- this.current = (this.current + 1) % this.frames.length;
118
- }, 80);
119
- }
120
- update(text) {
121
- this.text = text;
122
- }
123
- succeed(text) {
124
- this.stop();
125
- console.log(`\r${c.success('✓')} ${text || this.text}`);
126
- }
127
- fail(text) {
128
- this.stop();
129
- console.log(`\r${c.error('✗')} ${text || this.text}`);
130
- }
131
- warn(text) {
132
- this.stop();
133
- console.log(`\r${c.warning('!')} ${text || this.text}`);
134
- }
135
- stop() {
136
- if (this.interval) {
137
- clearInterval(this.interval);
138
- this.interval = null;
139
- process.stdout.write('\r\x1b[K'); // Clear line
140
- }
141
- }
142
- }
143
- /**
144
- * Progress bar
145
- */
146
- export class ProgressBar {
147
- total;
148
- current = 0;
149
- width;
150
- label;
151
- constructor(total, label = 'Progress', width = 30) {
152
- this.total = total;
153
- this.width = width;
154
- this.label = label;
155
- }
156
- update(current, label) {
157
- this.current = current;
158
- if (label)
159
- this.label = label;
160
- this.render();
161
- }
162
- increment(label) {
163
- this.update(this.current + 1, label);
164
- }
165
- render() {
166
- const percent = Math.min(100, Math.floor((this.current / this.total) * 100));
167
- const filled = Math.floor((this.current / this.total) * this.width);
168
- const empty = this.width - filled;
169
- const bar = `${colors.brightMagenta}${'█'.repeat(filled)}${colors.dim}${'░'.repeat(empty)}${colors.reset}`;
170
- const percentStr = `${percent}%`.padStart(4);
171
- process.stdout.write(`\r${this.label} ${bar} ${percentStr} (${this.current}/${this.total})`);
172
- }
173
- complete() {
174
- this.update(this.total);
175
- console.log(); // New line
176
- }
177
- }
178
- /**
179
- * Table formatter
180
- */
181
- export function formatTable(headers, rows, options = {}) {
182
- const { padding = 2, border = true } = options;
183
- // Calculate column widths
184
- const widths = headers.map((h, i) => {
185
- const maxRow = Math.max(...rows.map(r => (r[i] || '').length));
186
- return Math.max(h.length, maxRow);
187
- });
188
- const pad = (s, w) => s.padEnd(w);
189
- const sep = widths.map(w => '─'.repeat(w + padding)).join(border ? '┼' : ' ');
190
- let output = '';
191
- // Header
192
- if (border) {
193
- output += `${colors.dim}┌${widths.map(w => '─'.repeat(w + padding)).join('┬')}┐${colors.reset}\n`;
194
- }
195
- output += (border ? `${colors.dim}│${colors.reset}` : '') +
196
- headers.map((h, i) => ` ${c.bold(pad(h, widths[i]))} `).join(border ? `${colors.dim}│${colors.reset}` : '') +
197
- (border ? `${colors.dim}│${colors.reset}` : '') + '\n';
198
- if (border) {
199
- output += `${colors.dim}├${sep}┤${colors.reset}\n`;
200
- }
201
- // Rows
202
- for (const row of rows) {
203
- output += (border ? `${colors.dim}│${colors.reset}` : '') +
204
- row.map((cell, i) => ` ${pad(cell || '', widths[i])} `).join(border ? `${colors.dim}│${colors.reset}` : '') +
205
- (border ? `${colors.dim}│${colors.reset}` : '') + '\n';
206
- }
207
- if (border) {
208
- output += `${colors.dim}└${widths.map(w => '─'.repeat(w + padding)).join('┴')}┘${colors.reset}`;
209
- }
210
- return output;
211
- }
212
- /**
213
- * Box formatter
214
- */
215
- export function formatBox(title, content, width = 50) {
216
- const lines = content.split('\n');
217
- const maxLen = Math.max(title.length, ...lines.map(l => l.length), width);
218
- let output = `${colors.dim}╭${'─'.repeat(maxLen + 2)}╮${colors.reset}\n`;
219
- output += `${colors.dim}│${colors.reset} ${c.bold(title.padEnd(maxLen))} ${colors.dim}│${colors.reset}\n`;
220
- output += `${colors.dim}├${'─'.repeat(maxLen + 2)}┤${colors.reset}\n`;
221
- for (const line of lines) {
222
- output += `${colors.dim}│${colors.reset} ${line.padEnd(maxLen)} ${colors.dim}│${colors.reset}\n`;
223
- }
224
- output += `${colors.dim}╰${'─'.repeat(maxLen + 2)}╯${colors.reset}`;
225
- return output;
226
- }
227
- /**
228
- * Format bytes to human readable
229
- */
230
- export function formatBytes(bytes) {
231
- if (bytes === 0)
232
- return '0 B';
233
- const k = 1024;
234
- const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
235
- const i = Math.floor(Math.log(bytes) / Math.log(k));
236
- return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;
237
- }
238
- /**
239
- * Format duration
240
- */
241
- export function formatDuration(ms) {
242
- if (ms < 1000)
243
- return `${ms}ms`;
244
- if (ms < 60000)
245
- return `${(ms / 1000).toFixed(1)}s`;
246
- if (ms < 3600000)
247
- return `${Math.floor(ms / 60000)}m ${Math.floor((ms % 60000) / 1000)}s`;
248
- return `${Math.floor(ms / 3600000)}h ${Math.floor((ms % 3600000) / 60000)}m`;
249
- }
250
- /**
251
- * Print section header
252
- */
253
- export function printSection(title) {
254
- console.log(`\n${c.bold(c.primary(`▶ ${title}`))}`);
255
- console.log(`${colors.dim}${'─'.repeat(title.length + 4)}${colors.reset}`);
256
- }
257
- /**
258
- * Print success message
259
- */
260
- export function printSuccess(message) {
261
- console.log(`${icons.success} ${c.success(message)}`);
262
- }
263
- /**
264
- * Print error message
265
- */
266
- export function printError(message) {
267
- console.log(`${icons.error} ${c.error(message)}`);
268
- }
269
- /**
270
- * Print warning message
271
- */
272
- export function printWarning(message) {
273
- console.log(`${icons.warning} ${c.warning(message)}`);
274
- }
275
- /**
276
- * Print info message
277
- */
278
- export function printInfo(message) {
279
- console.log(`${icons.info} ${message}`);
280
- }
281
- //# sourceMappingURL=cli.js.map
1
+ const t={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"},a={bold:e=>`${t.bold}${e}${t.reset}`,dim:e=>`${t.dim}${e}${t.reset}`,red:e=>`${t.red}${e}${t.reset}`,green:e=>`${t.green}${e}${t.reset}`,yellow:e=>`${t.yellow}${e}${t.reset}`,blue:e=>`${t.blue}${e}${t.reset}`,magenta:e=>`${t.magenta}${e}${t.reset}`,cyan:e=>`${t.cyan}${e}${t.reset}`,primary:e=>`${t.brightMagenta}${e}${t.reset}`,success:e=>`${t.brightGreen}${e}${t.reset}`,warning:e=>`${t.brightYellow}${e}${t.reset}`,error:e=>`${t.brightRed}${e}${t.reset}`},m={dragon:"\u{F115D}",fire:"\u{1F525}",scroll:"\u{1F4DC}",sword:"\u2694\uFE0F",shield:"\u{1F6E1}\uFE0F",treasure:"\u{1F48E}",quest:"\u{1F3AF}",check:"\u2713",cross:"\u2717",arrow:"\u2192",bullet:"\u2022",star:"\u2605",warning:"\u26A0\uFE0F",error:"\u274C",success:"\u2705",info:"\u2139\uFE0F",clock:"\u{1F550}",folder:"\u{1F4C1}",file:"\u{1F4C4}",lock:"\u{1F512}",unlock:"\u{1F513}",sync:"\u{1F504}",search:"\u{1F50D}",sparkle:"\u2728"},b={critical:"\u{1F534}",high:"\u{1F7E0}",medium:"\u{1F7E1}",low:"\u{1F7E2}"},u=`
2
+ ${t.brightMagenta}\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557${t.reset}
3
+ ${t.brightMagenta}\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551${t.reset}
4
+ ${t.brightMagenta}\u2588\u2588\u2551 \u2588\u2557 \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551${t.reset}
5
+ ${t.brightMagenta}\u2588\u2588\u2551\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551${t.reset}
6
+ ${t.brightMagenta}\u255A\u2588\u2588\u2588\u2554\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551${t.reset}
7
+ ${t.brightMagenta} \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D${t.reset}
8
+ ${t.dim} Persistent AI Memory System v3.0.0${t.reset}
9
+ ${t.dim} ghosts.lk${t.reset}
10
+ `,x=`${t.brightMagenta}\u{F115D} Wyrm v3.0.0${t.reset}`;class f{frames=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];current=0;interval=null;text;constructor(r="Loading..."){this.text=r}start(){this.interval=setInterval(()=>{process.stdout.write(`\r${t.cyan}${this.frames[this.current]}${t.reset} ${this.text}`),this.current=(this.current+1)%this.frames.length},80)}update(r){this.text=r}succeed(r){this.stop(),console.log(`\r${a.success("\u2713")} ${r||this.text}`)}fail(r){this.stop(),console.log(`\r${a.error("\u2717")} ${r||this.text}`)}warn(r){this.stop(),console.log(`\r${a.warning("!")} ${r||this.text}`)}stop(){this.interval&&(clearInterval(this.interval),this.interval=null,process.stdout.write("\r\x1B[K"))}}class M{total;current=0;width;label;constructor(r,n="Progress",s=30){this.total=r,this.width=s,this.label=n}update(r,n){this.current=r,n&&(this.label=n),this.render()}increment(r){this.update(this.current+1,r)}render(){const r=Math.min(100,Math.floor(this.current/this.total*100)),n=Math.floor(this.current/this.total*this.width),s=this.width-n,o=`${t.brightMagenta}${"\u2588".repeat(n)}${t.dim}${"\u2591".repeat(s)}${t.reset}`,i=`${r}%`.padStart(4);process.stdout.write(`\r${this.label} ${o} ${i} (${this.current}/${this.total})`)}complete(){this.update(this.total),console.log()}}function w(e,r,n={}){const{padding:s=2,border:o=!0}=n,i=e.map(($,l)=>{const g=Math.max(...r.map(p=>(p[l]||"").length));return Math.max($.length,g)}),c=($,l)=>$.padEnd(l),d=i.map($=>"\u2500".repeat($+s)).join(o?"\u253C":" ");let h="";o&&(h+=`${t.dim}\u250C${i.map($=>"\u2500".repeat($+s)).join("\u252C")}\u2510${t.reset}
11
+ `),h+=(o?`${t.dim}\u2502${t.reset}`:"")+e.map(($,l)=>` ${a.bold(c($,i[l]))} `).join(o?`${t.dim}\u2502${t.reset}`:"")+(o?`${t.dim}\u2502${t.reset}`:"")+`
12
+ `,o&&(h+=`${t.dim}\u251C${d}\u2524${t.reset}
13
+ `);for(const $ of r)h+=(o?`${t.dim}\u2502${t.reset}`:"")+$.map((l,g)=>` ${c(l||"",i[g])} `).join(o?`${t.dim}\u2502${t.reset}`:"")+(o?`${t.dim}\u2502${t.reset}`:"")+`
14
+ `;return o&&(h+=`${t.dim}\u2514${i.map($=>"\u2500".repeat($+s)).join("\u2534")}\u2518${t.reset}`),h}function y(e,r,n=50){const s=r.split(`
15
+ `),o=Math.max(e.length,...s.map(c=>c.length),n);let i=`${t.dim}\u256D${"\u2500".repeat(o+2)}\u256E${t.reset}
16
+ `;i+=`${t.dim}\u2502${t.reset} ${a.bold(e.padEnd(o))} ${t.dim}\u2502${t.reset}
17
+ `,i+=`${t.dim}\u251C${"\u2500".repeat(o+2)}\u2524${t.reset}
18
+ `;for(const c of s)i+=`${t.dim}\u2502${t.reset} ${c.padEnd(o)} ${t.dim}\u2502${t.reset}
19
+ `;return i+=`${t.dim}\u2570${"\u2500".repeat(o+2)}\u256F${t.reset}`,i}function B(e){if(e===0)return"0 B";const r=1024,n=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(e)/Math.log(r));return`${(e/Math.pow(r,s)).toFixed(2)} ${n[s]}`}function v(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`:`${Math.floor(e/36e5)}h ${Math.floor(e%36e5/6e4)}m`}function k(e){console.log(`
20
+ ${a.bold(a.primary(`\u25B6 ${e}`))}`),console.log(`${t.dim}${"\u2500".repeat(e.length+4)}${t.reset}`)}function I(e){console.log(`${m.success} ${a.success(e)}`)}function E(e){console.log(`${m.error} ${a.error(e)}`)}function R(e){console.log(`${m.warning} ${a.warning(e)}`)}function S(e){console.log(`${m.info} ${e}`)}export{u as BANNER,x as MINI_BANNER,M as ProgressBar,f as Spinner,a as c,t as colors,y as formatBox,B as formatBytes,v as formatDuration,w as formatTable,m as icons,E as printError,S as printInfo,k as printSection,I as printSuccess,R as printWarning,b as priorityIcons};