erosolar-cli 1.7.260 → 1.7.262

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 (247) hide show
  1. package/README.md +22 -148
  2. package/dist/core/customCommands.d.ts +1 -0
  3. package/dist/core/customCommands.d.ts.map +1 -1
  4. package/dist/core/customCommands.js +3 -0
  5. package/dist/core/customCommands.js.map +1 -1
  6. package/dist/core/hooks.d.ts +113 -0
  7. package/dist/core/hooks.d.ts.map +1 -0
  8. package/dist/core/hooks.js +267 -0
  9. package/dist/core/hooks.js.map +1 -0
  10. package/dist/core/metricsTracker.d.ts +122 -0
  11. package/dist/core/metricsTracker.d.ts.map +1 -0
  12. package/dist/{alpha-zero → core}/metricsTracker.js +2 -5
  13. package/dist/core/metricsTracker.js.map +1 -0
  14. package/dist/core/toolPreconditions.d.ts.map +1 -1
  15. package/dist/core/toolPreconditions.js +0 -14
  16. package/dist/core/toolPreconditions.js.map +1 -1
  17. package/dist/core/toolRuntime.d.ts.map +1 -1
  18. package/dist/core/toolRuntime.js +0 -5
  19. package/dist/core/toolRuntime.js.map +1 -1
  20. package/dist/core/toolValidation.d.ts.map +1 -1
  21. package/dist/core/toolValidation.js +14 -3
  22. package/dist/core/toolValidation.js.map +1 -1
  23. package/dist/core/validationRunner.d.ts +1 -3
  24. package/dist/core/validationRunner.d.ts.map +1 -1
  25. package/dist/core/validationRunner.js.map +1 -1
  26. package/dist/mcp/sseClient.d.ts.map +1 -1
  27. package/dist/mcp/sseClient.js +9 -18
  28. package/dist/mcp/sseClient.js.map +1 -1
  29. package/dist/plugins/tools/build/buildPlugin.d.ts +0 -6
  30. package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
  31. package/dist/plugins/tools/build/buildPlugin.js +4 -10
  32. package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
  33. package/dist/shell/interactiveShell.d.ts +10 -2
  34. package/dist/shell/interactiveShell.d.ts.map +1 -1
  35. package/dist/shell/interactiveShell.js +182 -36
  36. package/dist/shell/interactiveShell.js.map +1 -1
  37. package/dist/shell/terminalInput.d.ts +68 -140
  38. package/dist/shell/terminalInput.d.ts.map +1 -1
  39. package/dist/shell/terminalInput.js +424 -685
  40. package/dist/shell/terminalInput.js.map +1 -1
  41. package/dist/shell/terminalInputAdapter.d.ts +20 -15
  42. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  43. package/dist/shell/terminalInputAdapter.js +14 -22
  44. package/dist/shell/terminalInputAdapter.js.map +1 -1
  45. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  46. package/dist/ui/ShellUIAdapter.js +13 -12
  47. package/dist/ui/ShellUIAdapter.js.map +1 -1
  48. package/dist/ui/display.d.ts +19 -0
  49. package/dist/ui/display.d.ts.map +1 -1
  50. package/dist/ui/display.js +131 -33
  51. package/dist/ui/display.js.map +1 -1
  52. package/dist/ui/theme.d.ts.map +1 -1
  53. package/dist/ui/theme.js +6 -8
  54. package/dist/ui/theme.js.map +1 -1
  55. package/dist/ui/toolDisplay.d.ts +0 -158
  56. package/dist/ui/toolDisplay.d.ts.map +1 -1
  57. package/dist/ui/toolDisplay.js +0 -348
  58. package/dist/ui/toolDisplay.js.map +1 -1
  59. package/dist/ui/unified/layout.d.ts +1 -0
  60. package/dist/ui/unified/layout.d.ts.map +1 -1
  61. package/dist/ui/unified/layout.js +15 -25
  62. package/dist/ui/unified/layout.js.map +1 -1
  63. package/package.json +1 -1
  64. package/dist/alpha-zero/agentWrapper.d.ts +0 -84
  65. package/dist/alpha-zero/agentWrapper.d.ts.map +0 -1
  66. package/dist/alpha-zero/agentWrapper.js +0 -171
  67. package/dist/alpha-zero/agentWrapper.js.map +0 -1
  68. package/dist/alpha-zero/codeEvaluator.d.ts +0 -25
  69. package/dist/alpha-zero/codeEvaluator.d.ts.map +0 -1
  70. package/dist/alpha-zero/codeEvaluator.js +0 -273
  71. package/dist/alpha-zero/codeEvaluator.js.map +0 -1
  72. package/dist/alpha-zero/competitiveRunner.d.ts +0 -66
  73. package/dist/alpha-zero/competitiveRunner.d.ts.map +0 -1
  74. package/dist/alpha-zero/competitiveRunner.js +0 -224
  75. package/dist/alpha-zero/competitiveRunner.js.map +0 -1
  76. package/dist/alpha-zero/index.d.ts +0 -67
  77. package/dist/alpha-zero/index.d.ts.map +0 -1
  78. package/dist/alpha-zero/index.js +0 -99
  79. package/dist/alpha-zero/index.js.map +0 -1
  80. package/dist/alpha-zero/introspection.d.ts +0 -128
  81. package/dist/alpha-zero/introspection.d.ts.map +0 -1
  82. package/dist/alpha-zero/introspection.js +0 -300
  83. package/dist/alpha-zero/introspection.js.map +0 -1
  84. package/dist/alpha-zero/metricsTracker.d.ts +0 -71
  85. package/dist/alpha-zero/metricsTracker.d.ts.map +0 -1
  86. package/dist/alpha-zero/metricsTracker.js.map +0 -1
  87. package/dist/alpha-zero/security/core.d.ts +0 -125
  88. package/dist/alpha-zero/security/core.d.ts.map +0 -1
  89. package/dist/alpha-zero/security/core.js +0 -271
  90. package/dist/alpha-zero/security/core.js.map +0 -1
  91. package/dist/alpha-zero/security/google.d.ts +0 -125
  92. package/dist/alpha-zero/security/google.d.ts.map +0 -1
  93. package/dist/alpha-zero/security/google.js +0 -311
  94. package/dist/alpha-zero/security/google.js.map +0 -1
  95. package/dist/alpha-zero/security/googleLoader.d.ts +0 -17
  96. package/dist/alpha-zero/security/googleLoader.d.ts.map +0 -1
  97. package/dist/alpha-zero/security/googleLoader.js +0 -41
  98. package/dist/alpha-zero/security/googleLoader.js.map +0 -1
  99. package/dist/alpha-zero/security/index.d.ts +0 -29
  100. package/dist/alpha-zero/security/index.d.ts.map +0 -1
  101. package/dist/alpha-zero/security/index.js +0 -32
  102. package/dist/alpha-zero/security/index.js.map +0 -1
  103. package/dist/alpha-zero/security/simulation.d.ts +0 -124
  104. package/dist/alpha-zero/security/simulation.d.ts.map +0 -1
  105. package/dist/alpha-zero/security/simulation.js +0 -277
  106. package/dist/alpha-zero/security/simulation.js.map +0 -1
  107. package/dist/alpha-zero/selfModification.d.ts +0 -109
  108. package/dist/alpha-zero/selfModification.d.ts.map +0 -1
  109. package/dist/alpha-zero/selfModification.js +0 -233
  110. package/dist/alpha-zero/selfModification.js.map +0 -1
  111. package/dist/alpha-zero/types.d.ts +0 -170
  112. package/dist/alpha-zero/types.d.ts.map +0 -1
  113. package/dist/alpha-zero/types.js +0 -31
  114. package/dist/alpha-zero/types.js.map +0 -1
  115. package/dist/core/aiFlowOptimizer.d.ts +0 -26
  116. package/dist/core/aiFlowOptimizer.d.ts.map +0 -1
  117. package/dist/core/aiFlowOptimizer.js +0 -31
  118. package/dist/core/aiFlowOptimizer.js.map +0 -1
  119. package/dist/core/aiOptimizationEngine.d.ts +0 -158
  120. package/dist/core/aiOptimizationEngine.d.ts.map +0 -1
  121. package/dist/core/aiOptimizationEngine.js +0 -428
  122. package/dist/core/aiOptimizationEngine.js.map +0 -1
  123. package/dist/core/aiOptimizationIntegration.d.ts +0 -93
  124. package/dist/core/aiOptimizationIntegration.d.ts.map +0 -1
  125. package/dist/core/aiOptimizationIntegration.js +0 -250
  126. package/dist/core/aiOptimizationIntegration.js.map +0 -1
  127. package/dist/core/enhancedErrorRecovery.d.ts +0 -100
  128. package/dist/core/enhancedErrorRecovery.d.ts.map +0 -1
  129. package/dist/core/enhancedErrorRecovery.js +0 -345
  130. package/dist/core/enhancedErrorRecovery.js.map +0 -1
  131. package/dist/core/unified/errors.d.ts +0 -189
  132. package/dist/core/unified/errors.d.ts.map +0 -1
  133. package/dist/core/unified/errors.js +0 -497
  134. package/dist/core/unified/errors.js.map +0 -1
  135. package/dist/core/unified/index.d.ts +0 -19
  136. package/dist/core/unified/index.d.ts.map +0 -1
  137. package/dist/core/unified/index.js +0 -68
  138. package/dist/core/unified/index.js.map +0 -1
  139. package/dist/core/unified/schema.d.ts +0 -101
  140. package/dist/core/unified/schema.d.ts.map +0 -1
  141. package/dist/core/unified/schema.js +0 -350
  142. package/dist/core/unified/schema.js.map +0 -1
  143. package/dist/core/unified/toolRuntime.d.ts +0 -179
  144. package/dist/core/unified/toolRuntime.d.ts.map +0 -1
  145. package/dist/core/unified/toolRuntime.js +0 -517
  146. package/dist/core/unified/toolRuntime.js.map +0 -1
  147. package/dist/core/unified/tools.d.ts +0 -127
  148. package/dist/core/unified/tools.d.ts.map +0 -1
  149. package/dist/core/unified/tools.js +0 -1333
  150. package/dist/core/unified/tools.js.map +0 -1
  151. package/dist/core/unified/types.d.ts +0 -352
  152. package/dist/core/unified/types.d.ts.map +0 -1
  153. package/dist/core/unified/types.js +0 -12
  154. package/dist/core/unified/types.js.map +0 -1
  155. package/dist/core/unified/version.d.ts +0 -209
  156. package/dist/core/unified/version.d.ts.map +0 -1
  157. package/dist/core/unified/version.js +0 -454
  158. package/dist/core/unified/version.js.map +0 -1
  159. package/dist/security/active-stack-security.d.ts +0 -112
  160. package/dist/security/active-stack-security.d.ts.map +0 -1
  161. package/dist/security/active-stack-security.js +0 -296
  162. package/dist/security/active-stack-security.js.map +0 -1
  163. package/dist/security/advanced-persistence-research.d.ts +0 -92
  164. package/dist/security/advanced-persistence-research.d.ts.map +0 -1
  165. package/dist/security/advanced-persistence-research.js +0 -195
  166. package/dist/security/advanced-persistence-research.js.map +0 -1
  167. package/dist/security/advanced-targeting.d.ts +0 -119
  168. package/dist/security/advanced-targeting.d.ts.map +0 -1
  169. package/dist/security/advanced-targeting.js +0 -233
  170. package/dist/security/advanced-targeting.js.map +0 -1
  171. package/dist/security/assessment/vulnerabilityAssessment.d.ts +0 -104
  172. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +0 -1
  173. package/dist/security/assessment/vulnerabilityAssessment.js +0 -315
  174. package/dist/security/assessment/vulnerabilityAssessment.js.map +0 -1
  175. package/dist/security/authorization/securityAuthorization.d.ts +0 -88
  176. package/dist/security/authorization/securityAuthorization.d.ts.map +0 -1
  177. package/dist/security/authorization/securityAuthorization.js +0 -172
  178. package/dist/security/authorization/securityAuthorization.js.map +0 -1
  179. package/dist/security/comprehensive-targeting.d.ts +0 -85
  180. package/dist/security/comprehensive-targeting.d.ts.map +0 -1
  181. package/dist/security/comprehensive-targeting.js +0 -438
  182. package/dist/security/comprehensive-targeting.js.map +0 -1
  183. package/dist/security/global-security-integration.d.ts +0 -91
  184. package/dist/security/global-security-integration.d.ts.map +0 -1
  185. package/dist/security/global-security-integration.js +0 -218
  186. package/dist/security/global-security-integration.js.map +0 -1
  187. package/dist/security/index.d.ts +0 -38
  188. package/dist/security/index.d.ts.map +0 -1
  189. package/dist/security/index.js +0 -47
  190. package/dist/security/index.js.map +0 -1
  191. package/dist/security/persistence-analyzer.d.ts +0 -56
  192. package/dist/security/persistence-analyzer.d.ts.map +0 -1
  193. package/dist/security/persistence-analyzer.js +0 -187
  194. package/dist/security/persistence-analyzer.js.map +0 -1
  195. package/dist/security/persistence-cli.d.ts +0 -36
  196. package/dist/security/persistence-cli.d.ts.map +0 -1
  197. package/dist/security/persistence-cli.js +0 -160
  198. package/dist/security/persistence-cli.js.map +0 -1
  199. package/dist/security/persistence-research.d.ts +0 -92
  200. package/dist/security/persistence-research.d.ts.map +0 -1
  201. package/dist/security/persistence-research.js +0 -364
  202. package/dist/security/persistence-research.js.map +0 -1
  203. package/dist/security/research/persistenceResearch.d.ts +0 -97
  204. package/dist/security/research/persistenceResearch.d.ts.map +0 -1
  205. package/dist/security/research/persistenceResearch.js +0 -282
  206. package/dist/security/research/persistenceResearch.js.map +0 -1
  207. package/dist/security/security-integration.d.ts +0 -74
  208. package/dist/security/security-integration.d.ts.map +0 -1
  209. package/dist/security/security-integration.js +0 -137
  210. package/dist/security/security-integration.js.map +0 -1
  211. package/dist/security/security-testing-framework.d.ts +0 -112
  212. package/dist/security/security-testing-framework.d.ts.map +0 -1
  213. package/dist/security/security-testing-framework.js +0 -364
  214. package/dist/security/security-testing-framework.js.map +0 -1
  215. package/dist/security/simulation/attackSimulation.d.ts +0 -93
  216. package/dist/security/simulation/attackSimulation.d.ts.map +0 -1
  217. package/dist/security/simulation/attackSimulation.js +0 -341
  218. package/dist/security/simulation/attackSimulation.js.map +0 -1
  219. package/dist/security/strategic-operations.d.ts +0 -100
  220. package/dist/security/strategic-operations.d.ts.map +0 -1
  221. package/dist/security/strategic-operations.js +0 -276
  222. package/dist/security/strategic-operations.js.map +0 -1
  223. package/dist/security/tool-security-wrapper.d.ts +0 -58
  224. package/dist/security/tool-security-wrapper.d.ts.map +0 -1
  225. package/dist/security/tool-security-wrapper.js +0 -156
  226. package/dist/security/tool-security-wrapper.js.map +0 -1
  227. package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
  228. package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
  229. package/dist/shell/claudeCodeStreamHandler.js +0 -322
  230. package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
  231. package/dist/shell/inputQueueManager.d.ts +0 -144
  232. package/dist/shell/inputQueueManager.d.ts.map +0 -1
  233. package/dist/shell/inputQueueManager.js +0 -290
  234. package/dist/shell/inputQueueManager.js.map +0 -1
  235. package/dist/shell/streamingOutputManager.d.ts +0 -115
  236. package/dist/shell/streamingOutputManager.d.ts.map +0 -1
  237. package/dist/shell/streamingOutputManager.js +0 -225
  238. package/dist/shell/streamingOutputManager.js.map +0 -1
  239. package/dist/ui/persistentPrompt.d.ts +0 -50
  240. package/dist/ui/persistentPrompt.d.ts.map +0 -1
  241. package/dist/ui/persistentPrompt.js +0 -92
  242. package/dist/ui/persistentPrompt.js.map +0 -1
  243. package/dist/ui/terminalUISchema.d.ts +0 -195
  244. package/dist/ui/terminalUISchema.d.ts.map +0 -1
  245. package/dist/ui/terminalUISchema.js +0 -113
  246. package/dist/ui/terminalUISchema.js.map +0 -1
  247. package/scripts/deploy-security-capabilities.js +0 -178
@@ -148,162 +148,4 @@ export interface ToolResultSummaryInput {
148
148
  * @returns Formatted string to display, or null if no display needed
149
149
  */
150
150
  export declare function formatToolResultSummary(input: ToolResultSummaryInput): string | null;
151
- /**
152
- * Box drawing characters for advanced UI
153
- */
154
- export declare const BOX: {
155
- readonly TOP_LEFT: "┌";
156
- readonly TOP_RIGHT: "┐";
157
- readonly BOTTOM_LEFT: "└";
158
- readonly BOTTOM_RIGHT: "┘";
159
- readonly HORIZONTAL: "─";
160
- readonly VERTICAL: "│";
161
- readonly T_RIGHT: "├";
162
- readonly T_LEFT: "┤";
163
- readonly T_DOWN: "┬";
164
- readonly T_UP: "┴";
165
- readonly CROSS: "┼";
166
- readonly D_TOP_LEFT: "╔";
167
- readonly D_TOP_RIGHT: "╗";
168
- readonly D_BOTTOM_LEFT: "╚";
169
- readonly D_BOTTOM_RIGHT: "╝";
170
- readonly D_HORIZONTAL: "═";
171
- readonly D_VERTICAL: "║";
172
- readonly R_TOP_LEFT: "╭";
173
- readonly R_TOP_RIGHT: "╮";
174
- readonly R_BOTTOM_LEFT: "╰";
175
- readonly R_BOTTOM_RIGHT: "╯";
176
- readonly H_HORIZONTAL: "━";
177
- readonly H_VERTICAL: "┃";
178
- readonly H_TOP_LEFT: "┏";
179
- readonly H_TOP_RIGHT: "┓";
180
- readonly H_BOTTOM_LEFT: "┗";
181
- readonly H_BOTTOM_RIGHT: "┛";
182
- readonly TREE_BRANCH: "├";
183
- readonly TREE_LAST: "└";
184
- readonly TREE_VERTICAL: "│";
185
- readonly TREE_BLANK: " ";
186
- };
187
- /**
188
- * Visual indicators and symbols
189
- */
190
- export declare const SYMBOLS: {
191
- readonly SUCCESS: "✓";
192
- readonly ERROR: "✗";
193
- readonly WARNING: "⚠";
194
- readonly INFO: "ℹ";
195
- readonly PENDING: "○";
196
- readonly ACTIVE: "●";
197
- readonly PROGRESS_FULL: "█";
198
- readonly PROGRESS_HALF: "▌";
199
- readonly PROGRESS_QUARTER: "▎";
200
- readonly PROGRESS_EMPTY: "░";
201
- readonly ARROW_RIGHT: "→";
202
- readonly ARROW_LEFT: "←";
203
- readonly ARROW_UP: "↑";
204
- readonly ARROW_DOWN: "↓";
205
- readonly DOUBLE_RIGHT: "»";
206
- readonly DOUBLE_LEFT: "«";
207
- readonly BULLET: "•";
208
- readonly DIAMOND: "◆";
209
- readonly CIRCLE: "○";
210
- readonly FILLED_CIRCLE: "●";
211
- readonly SQUARE: "□";
212
- readonly FILLED_SQUARE: "■";
213
- readonly TRIANGLE: "▶";
214
- readonly PLAY: "▶";
215
- readonly PAUSE: "⏸";
216
- readonly STOP: "⏹";
217
- readonly RECORD: "⏺";
218
- readonly ELLIPSIS: "…";
219
- readonly HOURGLASS: "⏳";
220
- readonly CHECKMARK: "✔";
221
- readonly CROSSMARK: "✘";
222
- readonly STAR: "★";
223
- readonly SPARKLE: "✨";
224
- readonly LIGHTNING: "⚡";
225
- readonly FIRE: "🔥";
226
- readonly GEAR: "⚙";
227
- readonly FOLDER: "📁";
228
- readonly FILE: "📄";
229
- readonly LINK: "🔗";
230
- };
231
- /**
232
- * Format a progress bar
233
- */
234
- export declare function formatProgressBar(percentage: number, width?: number, options?: {
235
- showPercentage?: boolean;
236
- filled?: string;
237
- empty?: string;
238
- }): string;
239
- /**
240
- * Format a box with content
241
- */
242
- export declare function formatBox(content: string | string[], options?: {
243
- title?: string;
244
- width?: number;
245
- style?: 'single' | 'double' | 'rounded' | 'heavy';
246
- padding?: number;
247
- }): string;
248
- /**
249
- * Format a tree structure
250
- */
251
- export declare function formatTree(items: Array<{
252
- label: string;
253
- children?: Array<{
254
- label: string;
255
- }>;
256
- }>, options?: {
257
- indent?: number;
258
- }): string;
259
- /**
260
- * Format a horizontal separator
261
- */
262
- export declare function formatSeparator(width?: number, options?: {
263
- style?: 'single' | 'double' | 'heavy' | 'dotted' | 'dashed';
264
- label?: string;
265
- }): string;
266
- /**
267
- * Format a section header with visual emphasis
268
- */
269
- export declare function formatSectionHeader(title: string, options?: {
270
- width?: number;
271
- style?: 'box' | 'underline' | 'bracket' | 'arrow';
272
- icon?: string;
273
- }): string;
274
- /**
275
- * Format a status indicator with icon and label
276
- */
277
- export declare function formatStatus(status: 'success' | 'error' | 'warning' | 'info' | 'pending' | 'active', label: string, detail?: string): string;
278
- /**
279
- * Format a metric/stat display
280
- */
281
- export declare function formatMetric(label: string, value: string | number, options?: {
282
- unit?: string;
283
- trend?: 'up' | 'down' | 'neutral';
284
- color?: 'success' | 'warning' | 'error' | 'info';
285
- }): string;
286
- /**
287
- * Format a table-like display with aligned columns
288
- */
289
- export declare function formatTable(rows: Array<string[]>, options?: {
290
- headers?: string[];
291
- separator?: boolean;
292
- align?: Array<'left' | 'right' | 'center'>;
293
- }): string;
294
- /**
295
- * Format a compact stats line
296
- */
297
- export declare function formatStatsLine(stats: Array<{
298
- label: string;
299
- value: string | number;
300
- color?: 'success' | 'warning' | 'error' | 'info';
301
- }>): string;
302
- /**
303
- * Format a tool execution block with full visual treatment
304
- */
305
- export declare function formatToolExecutionBlock(call: ToolCallDisplay, result: ToolResultDisplay, options?: {
306
- expanded?: boolean;
307
- showDuration?: boolean;
308
- }): string;
309
151
  //# sourceMappingURL=toolDisplay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolDisplay.d.ts","sourceRoot":"","sources":["../../src/ui/toolDisplay.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,G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,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,GAAG,IAAI,CA6KpF"}
@@ -1352,352 +1352,4 @@ function formatLearnResult(toolName, args, output, success) {
1352
1352
  return `${theme.success('✓')} Learning completed`;
1353
1353
  }
1354
1354
  }
1355
- // ============================================================================
1356
- // ADVANCED GRAPHICS - Box drawing, tree connectors, visual elements
1357
- // ============================================================================
1358
- /**
1359
- * Box drawing characters for advanced UI
1360
- */
1361
- export const BOX = {
1362
- // Single line
1363
- TOP_LEFT: '┌',
1364
- TOP_RIGHT: '┐',
1365
- BOTTOM_LEFT: '└',
1366
- BOTTOM_RIGHT: '┘',
1367
- HORIZONTAL: '─',
1368
- VERTICAL: '│',
1369
- T_RIGHT: '├',
1370
- T_LEFT: '┤',
1371
- T_DOWN: '┬',
1372
- T_UP: '┴',
1373
- CROSS: '┼',
1374
- // Double line
1375
- D_TOP_LEFT: '╔',
1376
- D_TOP_RIGHT: '╗',
1377
- D_BOTTOM_LEFT: '╚',
1378
- D_BOTTOM_RIGHT: '╝',
1379
- D_HORIZONTAL: '═',
1380
- D_VERTICAL: '║',
1381
- // Rounded
1382
- R_TOP_LEFT: '╭',
1383
- R_TOP_RIGHT: '╮',
1384
- R_BOTTOM_LEFT: '╰',
1385
- R_BOTTOM_RIGHT: '╯',
1386
- // Heavy
1387
- H_HORIZONTAL: '━',
1388
- H_VERTICAL: '┃',
1389
- H_TOP_LEFT: '┏',
1390
- H_TOP_RIGHT: '┓',
1391
- H_BOTTOM_LEFT: '┗',
1392
- H_BOTTOM_RIGHT: '┛',
1393
- // Tree connectors
1394
- TREE_BRANCH: '├',
1395
- TREE_LAST: '└',
1396
- TREE_VERTICAL: '│',
1397
- TREE_BLANK: ' ',
1398
- };
1399
- /**
1400
- * Visual indicators and symbols
1401
- */
1402
- export const SYMBOLS = {
1403
- // Status
1404
- SUCCESS: '✓',
1405
- ERROR: '✗',
1406
- WARNING: '⚠',
1407
- INFO: 'ℹ',
1408
- PENDING: '○',
1409
- ACTIVE: '●',
1410
- // Progress
1411
- PROGRESS_FULL: '█',
1412
- PROGRESS_HALF: '▌',
1413
- PROGRESS_QUARTER: '▎',
1414
- PROGRESS_EMPTY: '░',
1415
- // Arrows
1416
- ARROW_RIGHT: '→',
1417
- ARROW_LEFT: '←',
1418
- ARROW_UP: '↑',
1419
- ARROW_DOWN: '↓',
1420
- DOUBLE_RIGHT: '»',
1421
- DOUBLE_LEFT: '«',
1422
- // Bullets
1423
- BULLET: '•',
1424
- DIAMOND: '◆',
1425
- CIRCLE: '○',
1426
- FILLED_CIRCLE: '●',
1427
- SQUARE: '□',
1428
- FILLED_SQUARE: '■',
1429
- TRIANGLE: '▶',
1430
- // Actions
1431
- PLAY: '▶',
1432
- PAUSE: '⏸',
1433
- STOP: '⏹',
1434
- RECORD: '⏺',
1435
- // Special
1436
- ELLIPSIS: '…',
1437
- HOURGLASS: '⏳',
1438
- CHECKMARK: '✔',
1439
- CROSSMARK: '✘',
1440
- STAR: '★',
1441
- SPARKLE: '✨',
1442
- LIGHTNING: '⚡',
1443
- FIRE: '🔥',
1444
- GEAR: '⚙',
1445
- FOLDER: '📁',
1446
- FILE: '📄',
1447
- LINK: '🔗',
1448
- };
1449
- /**
1450
- * Format a progress bar
1451
- */
1452
- export function formatProgressBar(percentage, width = 20, options = {}) {
1453
- const { showPercentage = true, filled = SYMBOLS.PROGRESS_FULL, empty = SYMBOLS.PROGRESS_EMPTY } = options;
1454
- const pct = Math.max(0, Math.min(100, percentage));
1455
- const filledCount = Math.round((pct / 100) * width);
1456
- const emptyCount = width - filledCount;
1457
- let bar = filled.repeat(filledCount) + empty.repeat(emptyCount);
1458
- // Color based on percentage
1459
- if (pct >= 90) {
1460
- bar = theme.error(bar);
1461
- }
1462
- else if (pct >= 70) {
1463
- bar = theme.warning(bar);
1464
- }
1465
- else if (pct >= 30) {
1466
- bar = theme.success(bar);
1467
- }
1468
- else {
1469
- bar = theme.dim(bar);
1470
- }
1471
- if (showPercentage) {
1472
- return `${bar} ${pct}%`;
1473
- }
1474
- return bar;
1475
- }
1476
- /**
1477
- * Format a box with content
1478
- */
1479
- export function formatBox(content, options = {}) {
1480
- const { title, width = 60, style = 'single', padding = 1, } = options;
1481
- const chars = {
1482
- single: { tl: BOX.TOP_LEFT, tr: BOX.TOP_RIGHT, bl: BOX.BOTTOM_LEFT, br: BOX.BOTTOM_RIGHT, h: BOX.HORIZONTAL, v: BOX.VERTICAL },
1483
- double: { tl: BOX.D_TOP_LEFT, tr: BOX.D_TOP_RIGHT, bl: BOX.D_BOTTOM_LEFT, br: BOX.D_BOTTOM_RIGHT, h: BOX.D_HORIZONTAL, v: BOX.D_VERTICAL },
1484
- rounded: { tl: BOX.R_TOP_LEFT, tr: BOX.R_TOP_RIGHT, bl: BOX.R_BOTTOM_LEFT, br: BOX.R_BOTTOM_RIGHT, h: BOX.HORIZONTAL, v: BOX.VERTICAL },
1485
- heavy: { tl: BOX.H_TOP_LEFT, tr: BOX.H_TOP_RIGHT, bl: BOX.H_BOTTOM_LEFT, br: BOX.H_BOTTOM_RIGHT, h: BOX.H_HORIZONTAL, v: BOX.H_VERTICAL },
1486
- }[style];
1487
- const lines = Array.isArray(content) ? content : content.split('\n');
1488
- const innerWidth = width - 2 - (padding * 2);
1489
- const paddingStr = ' '.repeat(padding);
1490
- const result = [];
1491
- // Top border with optional title
1492
- if (title) {
1493
- const titleStr = ` ${title} `;
1494
- const leftPad = Math.floor((width - 2 - titleStr.length) / 2);
1495
- const rightPad = width - 2 - titleStr.length - leftPad;
1496
- result.push(`${chars.tl}${chars.h.repeat(leftPad)}${theme.info(titleStr)}${chars.h.repeat(rightPad)}${chars.tr}`);
1497
- }
1498
- else {
1499
- result.push(`${chars.tl}${chars.h.repeat(width - 2)}${chars.tr}`);
1500
- }
1501
- // Content lines
1502
- for (const line of lines) {
1503
- // Truncate or pad line to fit
1504
- const truncated = line.length > innerWidth ? line.slice(0, innerWidth - 1) + SYMBOLS.ELLIPSIS : line;
1505
- const padded = truncated.padEnd(innerWidth);
1506
- result.push(`${chars.v}${paddingStr}${padded}${paddingStr}${chars.v}`);
1507
- }
1508
- // Bottom border
1509
- result.push(`${chars.bl}${chars.h.repeat(width - 2)}${chars.br}`);
1510
- return result.join('\n');
1511
- }
1512
- /**
1513
- * Format a tree structure
1514
- */
1515
- export function formatTree(items, options = {}) {
1516
- const { indent = 2 } = options;
1517
- const lines = [];
1518
- for (let i = 0; i < items.length; i++) {
1519
- const item = items[i];
1520
- if (!item)
1521
- continue;
1522
- const isLast = i === items.length - 1;
1523
- const connector = isLast ? BOX.TREE_LAST : BOX.TREE_BRANCH;
1524
- lines.push(`${connector}${BOX.HORIZONTAL.repeat(indent - 1)} ${item.label}`);
1525
- if (item.children && item.children.length > 0) {
1526
- const prefix = isLast ? ' ' : BOX.TREE_VERTICAL;
1527
- for (let j = 0; j < item.children.length; j++) {
1528
- const child = item.children[j];
1529
- if (!child)
1530
- continue;
1531
- const childIsLast = j === item.children.length - 1;
1532
- const childConnector = childIsLast ? BOX.TREE_LAST : BOX.TREE_BRANCH;
1533
- lines.push(`${prefix}${' '.repeat(indent)}${childConnector}${BOX.HORIZONTAL.repeat(indent - 1)} ${child.label}`);
1534
- }
1535
- }
1536
- }
1537
- return lines.join('\n');
1538
- }
1539
- /**
1540
- * Format a horizontal separator
1541
- */
1542
- export function formatSeparator(width = 60, options = {}) {
1543
- const { style = 'single', label } = options;
1544
- const charMap = {
1545
- single: BOX.HORIZONTAL,
1546
- double: BOX.D_HORIZONTAL,
1547
- heavy: BOX.H_HORIZONTAL,
1548
- dotted: '·',
1549
- dashed: '-',
1550
- };
1551
- const char = charMap[style] ?? BOX.HORIZONTAL;
1552
- if (label) {
1553
- const labelStr = ` ${label} `;
1554
- const leftPad = Math.floor((width - labelStr.length) / 2);
1555
- const rightPad = width - labelStr.length - leftPad;
1556
- return `${theme.dim(char.repeat(leftPad))}${theme.info(labelStr)}${theme.dim(char.repeat(rightPad))}`;
1557
- }
1558
- return theme.dim(char.repeat(width));
1559
- }
1560
- /**
1561
- * Format a section header with visual emphasis
1562
- */
1563
- export function formatSectionHeader(title, options = {}) {
1564
- const { width = 60, style = 'underline', icon } = options;
1565
- const iconStr = icon ? `${icon} ` : '';
1566
- const fullTitle = `${iconStr}${title}`;
1567
- switch (style) {
1568
- case 'box':
1569
- return formatBox([fullTitle], { width, style: 'rounded', padding: 1 });
1570
- case 'bracket':
1571
- return `${theme.info('[')} ${theme.bold(fullTitle)} ${theme.info(']')}`;
1572
- case 'arrow':
1573
- return `${theme.info(SYMBOLS.DOUBLE_RIGHT)} ${theme.bold(fullTitle)}`;
1574
- case 'underline':
1575
- default:
1576
- return `${theme.bold(fullTitle)}\n${theme.dim(BOX.HORIZONTAL.repeat(Math.min(width, fullTitle.length + 4)))}`;
1577
- }
1578
- }
1579
- /**
1580
- * Format a status indicator with icon and label
1581
- */
1582
- export function formatStatus(status, label, detail) {
1583
- const iconMap = {
1584
- success: theme.success(SYMBOLS.SUCCESS),
1585
- error: theme.error(SYMBOLS.ERROR),
1586
- warning: theme.warning(SYMBOLS.WARNING),
1587
- info: theme.info(SYMBOLS.INFO),
1588
- pending: theme.dim(SYMBOLS.PENDING),
1589
- active: theme.info(SYMBOLS.ACTIVE),
1590
- };
1591
- const icon = iconMap[status] ?? theme.info(SYMBOLS.INFO);
1592
- const detailStr = detail ? ` ${theme.dim(`(${detail})`)}` : '';
1593
- return `${icon} ${label}${detailStr}`;
1594
- }
1595
- /**
1596
- * Format a metric/stat display
1597
- */
1598
- export function formatMetric(label, value, options = {}) {
1599
- const { unit, trend, color = 'info' } = options;
1600
- const colorFn = {
1601
- success: theme.success,
1602
- warning: theme.warning,
1603
- error: theme.error,
1604
- info: theme.info,
1605
- }[color];
1606
- const trendIcon = {
1607
- up: theme.success(SYMBOLS.ARROW_UP),
1608
- down: theme.error(SYMBOLS.ARROW_DOWN),
1609
- neutral: theme.dim('─'),
1610
- }[trend || 'neutral'] || '';
1611
- const valueStr = colorFn(String(value));
1612
- const unitStr = unit ? theme.dim(` ${unit}`) : '';
1613
- return `${theme.dim(label)}: ${valueStr}${unitStr} ${trendIcon}`;
1614
- }
1615
- /**
1616
- * Format a table-like display with aligned columns
1617
- */
1618
- export function formatTable(rows, options = {}) {
1619
- const { headers, separator = true, align } = options;
1620
- // Calculate column widths
1621
- const allRows = headers ? [headers, ...rows] : rows;
1622
- const colCount = Math.max(...allRows.map(r => r.length));
1623
- const colWidths = [];
1624
- for (let i = 0; i < colCount; i++) {
1625
- colWidths[i] = Math.max(...allRows.map(r => (r[i] || '').length));
1626
- }
1627
- // Format rows
1628
- const formatRow = (row, isHeader = false) => {
1629
- const cells = row.map((cell, i) => {
1630
- const width = colWidths[i] || 0;
1631
- const alignment = align?.[i] || 'left';
1632
- let padded;
1633
- switch (alignment) {
1634
- case 'right':
1635
- padded = cell.padStart(width);
1636
- break;
1637
- case 'center':
1638
- const leftPad = Math.floor((width - cell.length) / 2);
1639
- padded = cell.padStart(cell.length + leftPad).padEnd(width);
1640
- break;
1641
- default:
1642
- padded = cell.padEnd(width);
1643
- }
1644
- return isHeader ? theme.bold(padded) : padded;
1645
- });
1646
- return cells.join(' │ ');
1647
- };
1648
- const lines = [];
1649
- if (headers) {
1650
- lines.push(formatRow(headers, true));
1651
- if (separator) {
1652
- lines.push(colWidths.map(w => BOX.HORIZONTAL.repeat(w)).join('─┼─'));
1653
- }
1654
- }
1655
- for (const row of rows) {
1656
- lines.push(formatRow(row));
1657
- }
1658
- return lines.join('\n');
1659
- }
1660
- /**
1661
- * Format a compact stats line
1662
- */
1663
- export function formatStatsLine(stats) {
1664
- return stats.map(s => {
1665
- const colorFn = s.color ? {
1666
- success: theme.success,
1667
- warning: theme.warning,
1668
- error: theme.error,
1669
- info: theme.info,
1670
- }[s.color] : theme.info;
1671
- return `${theme.dim(s.label)}: ${colorFn(String(s.value))}`;
1672
- }).join(theme.dim(' │ '));
1673
- }
1674
- /**
1675
- * Format a tool execution block with full visual treatment
1676
- */
1677
- export function formatToolExecutionBlock(call, result, options = {}) {
1678
- const { expanded = false, showDuration = true } = options;
1679
- const lines = [];
1680
- // Tool call header
1681
- lines.push(formatToolCall(call, { includePrefix: true }));
1682
- // Status line
1683
- const statusIcon = result.status === 'error' ? theme.error(SYMBOLS.ERROR) :
1684
- result.status === 'warning' ? theme.warning(SYMBOLS.WARNING) :
1685
- theme.success(SYMBOLS.SUCCESS);
1686
- let statusLine = ` ${BOX.TREE_LAST}${BOX.HORIZONTAL} ${statusIcon} ${result.summary}`;
1687
- if (showDuration && result.duration) {
1688
- statusLine += ` ${theme.dim(`(${formatDuration(result.duration)})`)}`;
1689
- }
1690
- lines.push(statusLine);
1691
- // Expanded output
1692
- if (expanded && result.fullOutput) {
1693
- const outputLines = result.fullOutput.split('\n').slice(0, 10);
1694
- for (const line of outputLines) {
1695
- lines.push(` ${theme.dim(line.slice(0, 80))}`);
1696
- }
1697
- if (result.totalLines && result.totalLines > 10) {
1698
- lines.push(` ${theme.ui.muted(`... +${result.totalLines - 10} more lines`)}`);
1699
- }
1700
- }
1701
- return lines.join('\n');
1702
- }
1703
1355
  //# sourceMappingURL=toolDisplay.js.map