erosolar-cli 1.7.344 → 1.7.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -24
- package/dist/alpha-zero/agentWrapper.d.ts +84 -0
- package/dist/alpha-zero/agentWrapper.d.ts.map +1 -0
- package/dist/alpha-zero/agentWrapper.js +171 -0
- package/dist/alpha-zero/agentWrapper.js.map +1 -0
- package/dist/alpha-zero/codeEvaluator.d.ts +25 -0
- package/dist/alpha-zero/codeEvaluator.d.ts.map +1 -0
- package/dist/alpha-zero/codeEvaluator.js +273 -0
- package/dist/alpha-zero/codeEvaluator.js.map +1 -0
- package/dist/alpha-zero/competitiveRunner.d.ts +66 -0
- package/dist/alpha-zero/competitiveRunner.d.ts.map +1 -0
- package/dist/alpha-zero/competitiveRunner.js +224 -0
- package/dist/alpha-zero/competitiveRunner.js.map +1 -0
- package/dist/alpha-zero/index.d.ts +67 -0
- package/dist/alpha-zero/index.d.ts.map +1 -0
- package/dist/alpha-zero/index.js +99 -0
- package/dist/alpha-zero/index.js.map +1 -0
- package/dist/alpha-zero/introspection.d.ts +128 -0
- package/dist/alpha-zero/introspection.d.ts.map +1 -0
- package/dist/alpha-zero/introspection.js +300 -0
- package/dist/alpha-zero/introspection.js.map +1 -0
- package/dist/alpha-zero/metricsTracker.d.ts +71 -0
- package/dist/alpha-zero/metricsTracker.d.ts.map +1 -0
- package/dist/{core → alpha-zero}/metricsTracker.js +5 -2
- package/dist/alpha-zero/metricsTracker.js.map +1 -0
- package/dist/alpha-zero/security/core.d.ts +125 -0
- package/dist/alpha-zero/security/core.d.ts.map +1 -0
- package/dist/alpha-zero/security/core.js +271 -0
- package/dist/alpha-zero/security/core.js.map +1 -0
- package/dist/alpha-zero/security/google.d.ts +125 -0
- package/dist/alpha-zero/security/google.d.ts.map +1 -0
- package/dist/alpha-zero/security/google.js +311 -0
- package/dist/alpha-zero/security/google.js.map +1 -0
- package/dist/alpha-zero/security/googleLoader.d.ts +17 -0
- package/dist/alpha-zero/security/googleLoader.d.ts.map +1 -0
- package/dist/alpha-zero/security/googleLoader.js +41 -0
- package/dist/alpha-zero/security/googleLoader.js.map +1 -0
- package/dist/alpha-zero/security/index.d.ts +29 -0
- package/dist/alpha-zero/security/index.d.ts.map +1 -0
- package/dist/alpha-zero/security/index.js +32 -0
- package/dist/alpha-zero/security/index.js.map +1 -0
- package/dist/alpha-zero/security/simulation.d.ts +124 -0
- package/dist/alpha-zero/security/simulation.d.ts.map +1 -0
- package/dist/alpha-zero/security/simulation.js +277 -0
- package/dist/alpha-zero/security/simulation.js.map +1 -0
- package/dist/alpha-zero/selfModification.d.ts +109 -0
- package/dist/alpha-zero/selfModification.d.ts.map +1 -0
- package/dist/alpha-zero/selfModification.js +233 -0
- package/dist/alpha-zero/selfModification.js.map +1 -0
- package/dist/alpha-zero/types.d.ts +170 -0
- package/dist/alpha-zero/types.d.ts.map +1 -0
- package/dist/alpha-zero/types.js +31 -0
- package/dist/alpha-zero/types.js.map +1 -0
- package/dist/bin/erosolar.js +21 -5
- package/dist/bin/erosolar.js.map +1 -1
- package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -1
- package/dist/capabilities/agentSpawningCapability.js +31 -56
- package/dist/capabilities/agentSpawningCapability.js.map +1 -1
- package/dist/capabilities/securityTestingCapability.d.ts +13 -0
- package/dist/capabilities/securityTestingCapability.d.ts.map +1 -0
- package/dist/capabilities/securityTestingCapability.js +25 -0
- package/dist/capabilities/securityTestingCapability.js.map +1 -0
- package/dist/contracts/agent-schemas.json +15 -0
- package/dist/contracts/tools.schema.json +9 -0
- package/dist/core/agent.d.ts +2 -2
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js.map +1 -1
- package/dist/core/aiFlowOptimizer.d.ts +26 -0
- package/dist/core/aiFlowOptimizer.d.ts.map +1 -0
- package/dist/core/aiFlowOptimizer.js +31 -0
- package/dist/core/aiFlowOptimizer.js.map +1 -0
- package/dist/core/aiOptimizationEngine.d.ts +158 -0
- package/dist/core/aiOptimizationEngine.d.ts.map +1 -0
- package/dist/core/aiOptimizationEngine.js +428 -0
- package/dist/core/aiOptimizationEngine.js.map +1 -0
- package/dist/core/aiOptimizationIntegration.d.ts +93 -0
- package/dist/core/aiOptimizationIntegration.d.ts.map +1 -0
- package/dist/core/aiOptimizationIntegration.js +250 -0
- package/dist/core/aiOptimizationIntegration.js.map +1 -0
- package/dist/core/customCommands.d.ts +0 -1
- package/dist/core/customCommands.d.ts.map +1 -1
- package/dist/core/customCommands.js +0 -3
- package/dist/core/customCommands.js.map +1 -1
- package/dist/core/enhancedErrorRecovery.d.ts +100 -0
- package/dist/core/enhancedErrorRecovery.d.ts.map +1 -0
- package/dist/core/enhancedErrorRecovery.js +345 -0
- package/dist/core/enhancedErrorRecovery.js.map +1 -0
- package/dist/core/hooksSystem.d.ts +65 -0
- package/dist/core/hooksSystem.d.ts.map +1 -0
- package/dist/core/hooksSystem.js +273 -0
- package/dist/core/hooksSystem.js.map +1 -0
- package/dist/core/memorySystem.d.ts +48 -0
- package/dist/core/memorySystem.d.ts.map +1 -0
- package/dist/core/memorySystem.js +271 -0
- package/dist/core/memorySystem.js.map +1 -0
- package/dist/core/sessionStore.d.ts +0 -2
- package/dist/core/sessionStore.d.ts.map +1 -1
- package/dist/core/sessionStore.js +0 -1
- package/dist/core/sessionStore.js.map +1 -1
- package/dist/core/toolPreconditions.d.ts.map +1 -1
- package/dist/core/toolPreconditions.js +14 -0
- package/dist/core/toolPreconditions.js.map +1 -1
- package/dist/core/toolRuntime.d.ts +1 -22
- package/dist/core/toolRuntime.d.ts.map +1 -1
- package/dist/core/toolRuntime.js +5 -0
- package/dist/core/toolRuntime.js.map +1 -1
- package/dist/core/toolValidation.d.ts.map +1 -1
- package/dist/core/toolValidation.js +3 -14
- package/dist/core/toolValidation.js.map +1 -1
- package/dist/core/unified/errors.d.ts +189 -0
- package/dist/core/unified/errors.d.ts.map +1 -0
- package/dist/core/unified/errors.js +497 -0
- package/dist/core/unified/errors.js.map +1 -0
- package/dist/core/unified/index.d.ts +19 -0
- package/dist/core/unified/index.d.ts.map +1 -0
- package/dist/core/unified/index.js +68 -0
- package/dist/core/unified/index.js.map +1 -0
- package/dist/core/unified/schema.d.ts +101 -0
- package/dist/core/unified/schema.d.ts.map +1 -0
- package/dist/core/unified/schema.js +350 -0
- package/dist/core/unified/schema.js.map +1 -0
- package/dist/core/unified/toolRuntime.d.ts +179 -0
- package/dist/core/unified/toolRuntime.d.ts.map +1 -0
- package/dist/core/unified/toolRuntime.js +517 -0
- package/dist/core/unified/toolRuntime.js.map +1 -0
- package/dist/core/unified/tools.d.ts +127 -0
- package/dist/core/unified/tools.d.ts.map +1 -0
- package/dist/core/unified/tools.js +1333 -0
- package/dist/core/unified/tools.js.map +1 -0
- package/dist/core/unified/types.d.ts +352 -0
- package/dist/core/unified/types.d.ts.map +1 -0
- package/dist/core/unified/types.js +12 -0
- package/dist/core/unified/types.js.map +1 -0
- package/dist/core/unified/version.d.ts +209 -0
- package/dist/core/unified/version.d.ts.map +1 -0
- package/dist/core/unified/version.js +454 -0
- package/dist/core/unified/version.js.map +1 -0
- package/dist/core/validationRunner.d.ts +3 -1
- package/dist/core/validationRunner.d.ts.map +1 -1
- package/dist/core/validationRunner.js.map +1 -1
- package/dist/headless/headlessApp.d.ts.map +1 -1
- package/dist/headless/headlessApp.js +0 -21
- package/dist/headless/headlessApp.js.map +1 -1
- package/dist/mcp/sseClient.d.ts.map +1 -1
- package/dist/mcp/sseClient.js +18 -9
- package/dist/mcp/sseClient.js.map +1 -1
- package/dist/plugins/tools/build/buildPlugin.d.ts +6 -0
- package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
- package/dist/plugins/tools/build/buildPlugin.js +10 -4
- package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
- package/dist/plugins/tools/nodeDefaults.js +2 -0
- package/dist/plugins/tools/nodeDefaults.js.map +1 -1
- package/dist/plugins/tools/security/securityPlugin.d.ts +3 -0
- package/dist/plugins/tools/security/securityPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/security/securityPlugin.js +12 -0
- package/dist/plugins/tools/security/securityPlugin.js.map +1 -0
- package/dist/runtime/agentSession.d.ts +2 -2
- package/dist/runtime/agentSession.d.ts.map +1 -1
- package/dist/runtime/agentSession.js +2 -2
- package/dist/runtime/agentSession.js.map +1 -1
- package/dist/security/active-stack-security.d.ts +112 -0
- package/dist/security/active-stack-security.d.ts.map +1 -0
- package/dist/security/active-stack-security.js +296 -0
- package/dist/security/active-stack-security.js.map +1 -0
- package/dist/security/advanced-persistence-research.d.ts +92 -0
- package/dist/security/advanced-persistence-research.d.ts.map +1 -0
- package/dist/security/advanced-persistence-research.js +195 -0
- package/dist/security/advanced-persistence-research.js.map +1 -0
- package/dist/security/advanced-targeting.d.ts +119 -0
- package/dist/security/advanced-targeting.d.ts.map +1 -0
- package/dist/security/advanced-targeting.js +233 -0
- package/dist/security/advanced-targeting.js.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
- package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
- package/dist/security/authorization/securityAuthorization.d.ts +88 -0
- package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
- package/dist/security/authorization/securityAuthorization.js +172 -0
- package/dist/security/authorization/securityAuthorization.js.map +1 -0
- package/dist/security/comprehensive-targeting.d.ts +85 -0
- package/dist/security/comprehensive-targeting.d.ts.map +1 -0
- package/dist/security/comprehensive-targeting.js +438 -0
- package/dist/security/comprehensive-targeting.js.map +1 -0
- package/dist/security/global-security-integration.d.ts +91 -0
- package/dist/security/global-security-integration.d.ts.map +1 -0
- package/dist/security/global-security-integration.js +218 -0
- package/dist/security/global-security-integration.js.map +1 -0
- package/dist/security/index.d.ts +38 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +47 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/persistence-analyzer.d.ts +56 -0
- package/dist/security/persistence-analyzer.d.ts.map +1 -0
- package/dist/security/persistence-analyzer.js +187 -0
- package/dist/security/persistence-analyzer.js.map +1 -0
- package/dist/security/persistence-cli.d.ts +36 -0
- package/dist/security/persistence-cli.d.ts.map +1 -0
- package/dist/security/persistence-cli.js +160 -0
- package/dist/security/persistence-cli.js.map +1 -0
- package/dist/security/persistence-research.d.ts +92 -0
- package/dist/security/persistence-research.d.ts.map +1 -0
- package/dist/security/persistence-research.js +364 -0
- package/dist/security/persistence-research.js.map +1 -0
- package/dist/security/research/persistenceResearch.d.ts +97 -0
- package/dist/security/research/persistenceResearch.d.ts.map +1 -0
- package/dist/security/research/persistenceResearch.js +282 -0
- package/dist/security/research/persistenceResearch.js.map +1 -0
- package/dist/security/security-integration.d.ts +74 -0
- package/dist/security/security-integration.d.ts.map +1 -0
- package/dist/security/security-integration.js +137 -0
- package/dist/security/security-integration.js.map +1 -0
- package/dist/security/security-testing-framework.d.ts +112 -0
- package/dist/security/security-testing-framework.d.ts.map +1 -0
- package/dist/security/security-testing-framework.js +364 -0
- package/dist/security/security-testing-framework.js.map +1 -0
- package/dist/security/simulation/attackSimulation.d.ts +93 -0
- package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
- package/dist/security/simulation/attackSimulation.js +341 -0
- package/dist/security/simulation/attackSimulation.js.map +1 -0
- package/dist/security/strategic-operations.d.ts +100 -0
- package/dist/security/strategic-operations.d.ts.map +1 -0
- package/dist/security/strategic-operations.js +276 -0
- package/dist/security/strategic-operations.js.map +1 -0
- package/dist/security/tool-security-wrapper.d.ts +58 -0
- package/dist/security/tool-security-wrapper.d.ts.map +1 -0
- package/dist/security/tool-security-wrapper.js +156 -0
- package/dist/security/tool-security-wrapper.js.map +1 -0
- package/dist/shell/claudeCodeStreamHandler.d.ts +145 -0
- package/dist/shell/claudeCodeStreamHandler.d.ts.map +1 -0
- package/dist/shell/claudeCodeStreamHandler.js +322 -0
- package/dist/shell/claudeCodeStreamHandler.js.map +1 -0
- package/dist/shell/inputQueueManager.d.ts +144 -0
- package/dist/shell/inputQueueManager.d.ts.map +1 -0
- package/dist/shell/inputQueueManager.js +290 -0
- package/dist/shell/inputQueueManager.js.map +1 -0
- package/dist/shell/interactiveShell.d.ts +7 -19
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +166 -271
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/metricsTracker.d.ts +60 -0
- package/dist/shell/metricsTracker.d.ts.map +1 -0
- package/dist/shell/metricsTracker.js +119 -0
- package/dist/shell/metricsTracker.js.map +1 -0
- package/dist/shell/shellApp.d.ts +0 -2
- package/dist/shell/shellApp.d.ts.map +1 -1
- package/dist/shell/shellApp.js +9 -82
- package/dist/shell/shellApp.js.map +1 -1
- package/dist/shell/streamingOutputManager.d.ts +115 -0
- package/dist/shell/streamingOutputManager.d.ts.map +1 -0
- package/dist/shell/streamingOutputManager.js +225 -0
- package/dist/shell/streamingOutputManager.js.map +1 -0
- package/dist/shell/systemPrompt.d.ts.map +1 -1
- package/dist/shell/systemPrompt.js +4 -1
- package/dist/shell/systemPrompt.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +120 -218
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +537 -932
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts +21 -99
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +30 -135
- package/dist/shell/terminalInputAdapter.js.map +1 -1
- package/dist/subagents/taskRunner.d.ts +1 -7
- package/dist/subagents/taskRunner.d.ts.map +1 -1
- package/dist/subagents/taskRunner.js +47 -180
- package/dist/subagents/taskRunner.js.map +1 -1
- package/dist/tools/securityTools.d.ts +22 -0
- package/dist/tools/securityTools.d.ts.map +1 -0
- package/dist/tools/securityTools.js +448 -0
- package/dist/tools/securityTools.js.map +1 -0
- package/dist/ui/ShellUIAdapter.d.ts +1 -7
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +18 -42
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/display.d.ts +45 -24
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +259 -140
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/persistentPrompt.d.ts +50 -0
- package/dist/ui/persistentPrompt.d.ts.map +1 -0
- package/dist/ui/persistentPrompt.js +92 -0
- package/dist/ui/persistentPrompt.js.map +1 -0
- package/dist/ui/terminalUISchema.d.ts +195 -0
- package/dist/ui/terminalUISchema.d.ts.map +1 -0
- package/dist/ui/terminalUISchema.js +113 -0
- package/dist/ui/terminalUISchema.js.map +1 -0
- package/dist/ui/theme.d.ts.map +1 -1
- package/dist/ui/theme.js +8 -6
- package/dist/ui/theme.js.map +1 -1
- package/dist/ui/toolDisplay.d.ts +158 -0
- package/dist/ui/toolDisplay.d.ts.map +1 -1
- package/dist/ui/toolDisplay.js +348 -0
- package/dist/ui/toolDisplay.js.map +1 -1
- package/dist/ui/unified/layout.d.ts +0 -20
- package/dist/ui/unified/layout.d.ts.map +1 -1
- package/dist/ui/unified/layout.js +216 -29
- package/dist/ui/unified/layout.js.map +1 -1
- package/package.json +4 -4
- package/scripts/deploy-security-capabilities.js +178 -0
- package/dist/core/hooks.d.ts +0 -113
- package/dist/core/hooks.d.ts.map +0 -1
- package/dist/core/hooks.js +0 -267
- package/dist/core/hooks.js.map +0 -1
- package/dist/core/metricsTracker.d.ts +0 -122
- package/dist/core/metricsTracker.d.ts.map +0 -1
- package/dist/core/metricsTracker.js.map +0 -1
- package/dist/core/securityAssessment.d.ts +0 -91
- package/dist/core/securityAssessment.d.ts.map +0 -1
- package/dist/core/securityAssessment.js +0 -580
- package/dist/core/securityAssessment.js.map +0 -1
- package/dist/core/verification.d.ts +0 -137
- package/dist/core/verification.d.ts.map +0 -1
- package/dist/core/verification.js +0 -323
- package/dist/core/verification.js.map +0 -1
- package/dist/subagents/agentConfig.d.ts +0 -27
- package/dist/subagents/agentConfig.d.ts.map +0 -1
- package/dist/subagents/agentConfig.js +0 -89
- package/dist/subagents/agentConfig.js.map +0 -1
- package/dist/subagents/agentRegistry.d.ts +0 -33
- package/dist/subagents/agentRegistry.d.ts.map +0 -1
- package/dist/subagents/agentRegistry.js +0 -162
- package/dist/subagents/agentRegistry.js.map +0 -1
- package/dist/utils/frontmatter.d.ts +0 -10
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js +0 -78
- package/dist/utils/frontmatter.js.map +0 -1
package/dist/ui/toolDisplay.d.ts
CHANGED
|
@@ -148,4 +148,162 @@ 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;
|
|
151
309
|
//# 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,GAAG,MAAM,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GACxC,MAAM,CASR;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GACxC,MAAM,CAiBR;AAuID;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAA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;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;CAC7C,GACL,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,EACrB,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;CACvC,GACL,MAAM,CAmDR;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;CAAE,CAAC,GACxG,MAAM,CAWR;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACnB,GACL,MAAM,CAgCR"}
|
package/dist/ui/toolDisplay.js
CHANGED
|
@@ -1352,4 +1352,352 @@ 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
|
+
}
|
|
1355
1703
|
//# sourceMappingURL=toolDisplay.js.map
|