erosolar-cli 1.7.55 → 1.7.57
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/dist/shell/unifiedInputProcessor.d.ts +15 -12
- package/dist/shell/unifiedInputProcessor.d.ts.map +1 -1
- package/dist/shell/unifiedInputProcessor.js +45 -72
- package/dist/shell/unifiedInputProcessor.js.map +1 -1
- package/package.json +4 -4
- package/dist/active-stack-security.d.ts +0 -110
- package/dist/active-stack-security.js +0 -313
- package/dist/active-stack-security.js.map +0 -1
- package/dist/advanced-targeting.d.ts +0 -113
- package/dist/advanced-targeting.js +0 -252
- package/dist/advanced-targeting.js.map +0 -1
- package/dist/bin/adapters/node/index.js +0 -33
- package/dist/bin/adapters/types.js +0 -1
- package/dist/bin/alpha-zero/agentWrapper.js +0 -165
- package/dist/bin/alpha-zero/codeEvaluator.js +0 -272
- package/dist/bin/alpha-zero/competitiveRunner.js +0 -219
- package/dist/bin/alpha-zero/index.js +0 -98
- package/dist/bin/alpha-zero/introspection.js +0 -298
- package/dist/bin/alpha-zero/metricsTracker.js +0 -207
- package/dist/bin/alpha-zero/security/core.js +0 -269
- package/dist/bin/alpha-zero/security/google.js +0 -308
- package/dist/bin/alpha-zero/security/googleLoader.js +0 -40
- package/dist/bin/alpha-zero/security/index.js +0 -31
- package/dist/bin/alpha-zero/security/simulation.js +0 -274
- package/dist/bin/alpha-zero/selfModification.js +0 -231
- package/dist/bin/alpha-zero/types.js +0 -30
- package/dist/bin/bin/erosolar-optimized.js +0 -205
- package/dist/bin/capabilities/agentSpawningCapability.js +0 -116
- package/dist/bin/capabilities/bashCapability.js +0 -22
- package/dist/bin/capabilities/cloudCapability.js +0 -36
- package/dist/bin/capabilities/codeAnalysisCapability.js +0 -22
- package/dist/bin/capabilities/codeQualityCapability.js +0 -23
- package/dist/bin/capabilities/dependencySecurityCapability.js +0 -22
- package/dist/bin/capabilities/devCapability.js +0 -22
- package/dist/bin/capabilities/editCapability.js +0 -28
- package/dist/bin/capabilities/emailCapability.js +0 -20
- package/dist/bin/capabilities/enhancedGitCapability.js +0 -221
- package/dist/bin/capabilities/filesystemCapability.js +0 -22
- package/dist/bin/capabilities/globCapability.js +0 -28
- package/dist/bin/capabilities/interactionCapability.js +0 -20
- package/dist/bin/capabilities/learnCapability.js +0 -22
- package/dist/bin/capabilities/mcpCapability.js +0 -20
- package/dist/bin/capabilities/notebookCapability.js +0 -28
- package/dist/bin/capabilities/planningCapability.js +0 -27
- package/dist/bin/capabilities/refactoringCapability.js +0 -23
- package/dist/bin/capabilities/repoChecksCapability.js +0 -22
- package/dist/bin/capabilities/searchCapability.js +0 -22
- package/dist/bin/capabilities/skillCapability.js +0 -76
- package/dist/bin/capabilities/taskManagementCapability.js +0 -20
- package/dist/bin/capabilities/testingCapability.js +0 -23
- package/dist/bin/capabilities/toolManifest.js +0 -159
- package/dist/bin/capabilities/toolRegistry.js +0 -114
- package/dist/bin/capabilities/webCapability.js +0 -20
- package/dist/bin/config.js +0 -139
- package/dist/bin/contracts/v1/agent.js +0 -7
- package/dist/bin/contracts/v1/agentProfileManifest.js +0 -8
- package/dist/bin/contracts/v1/agentRules.js +0 -9
- package/dist/bin/contracts/v1/toolAccess.js +0 -8
- package/dist/bin/erosolar-optimized.d.ts +0 -12
- package/dist/bin/erosolar-optimized.d.ts.map +0 -1
- package/dist/bin/erosolar-optimized.js +0 -239
- package/dist/bin/erosolar-optimized.js.map +0 -1
- package/dist/bin/headless/headlessApp.js +0 -172
- package/dist/bin/mcp/config.js +0 -202
- package/dist/bin/mcp/stdioClient.js +0 -172
- package/dist/bin/mcp/toolBridge.js +0 -104
- package/dist/bin/mcp/types.js +0 -1
- package/dist/bin/plugins/index.js +0 -113
- package/dist/bin/plugins/providers/anthropic/index.js +0 -25
- package/dist/bin/plugins/providers/deepseek/index.js +0 -24
- package/dist/bin/plugins/providers/google/index.js +0 -26
- package/dist/bin/plugins/providers/index.js +0 -19
- package/dist/bin/plugins/providers/ollama/index.js +0 -59
- package/dist/bin/plugins/providers/openai/index.js +0 -26
- package/dist/bin/plugins/providers/xai/index.js +0 -24
- package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -8
- package/dist/bin/plugins/tools/bash/localBashPlugin.js +0 -13
- package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +0 -13
- package/dist/bin/plugins/tools/cloud/cloudPlugin.js +0 -13
- package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -13
- package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +0 -13
- package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +0 -11
- package/dist/bin/plugins/tools/development/devPlugin.js +0 -13
- package/dist/bin/plugins/tools/edit/editPlugin.js +0 -14
- package/dist/bin/plugins/tools/email/emailPlugin.js +0 -11
- package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -8
- package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +0 -13
- package/dist/bin/plugins/tools/glob/globPlugin.js +0 -14
- package/dist/bin/plugins/tools/index.js +0 -2
- package/dist/bin/plugins/tools/interaction/interactionPlugin.js +0 -11
- package/dist/bin/plugins/tools/learn/learnPlugin.js +0 -13
- package/dist/bin/plugins/tools/mcp/mcpPlugin.js +0 -8
- package/dist/bin/plugins/tools/nodeDefaults.js +0 -56
- package/dist/bin/plugins/tools/notebook/notebookPlugin.js +0 -14
- package/dist/bin/plugins/tools/planning/planningPlugin.js +0 -14
- package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +0 -11
- package/dist/bin/plugins/tools/registry.js +0 -57
- package/dist/bin/plugins/tools/search/localSearchPlugin.js +0 -13
- package/dist/bin/plugins/tools/skills/skillPlugin.js +0 -8
- package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +0 -11
- package/dist/bin/plugins/tools/testing/testingPlugin.js +0 -11
- package/dist/bin/plugins/tools/web/webPlugin.js +0 -11
- package/dist/bin/providers/anthropicProvider.js +0 -329
- package/dist/bin/providers/googleProvider.js +0 -203
- package/dist/bin/providers/openaiChatCompletionsProvider.js +0 -208
- package/dist/bin/providers/openaiResponsesProvider.js +0 -249
- package/dist/bin/providers/providerFactory.js +0 -24
- package/dist/bin/runtime/agentController.js +0 -321
- package/dist/bin/runtime/agentHost.js +0 -153
- package/dist/bin/runtime/agentSession.js +0 -195
- package/dist/bin/runtime/node.js +0 -10
- package/dist/bin/runtime/universal.js +0 -28
- package/dist/bin/skills/skillRepository.js +0 -236
- package/dist/bin/skills/types.js +0 -1
- package/dist/bin/subagents/taskRunner.js +0 -269
- package/dist/bin/tools/backgroundBashTools.js +0 -211
- package/dist/bin/tools/bashTools.js +0 -159
- package/dist/bin/tools/cloudTools.js +0 -864
- package/dist/bin/tools/codeAnalysisTools.js +0 -641
- package/dist/bin/tools/codeQualityTools.js +0 -294
- package/dist/bin/tools/dependencyTools.js +0 -282
- package/dist/bin/tools/devTools.js +0 -238
- package/dist/bin/tools/diffUtils.js +0 -137
- package/dist/bin/tools/editTools.js +0 -134
- package/dist/bin/tools/emailTools.js +0 -448
- package/dist/bin/tools/fileTools.js +0 -282
- package/dist/bin/tools/globTools.js +0 -173
- package/dist/bin/tools/grepTools.js +0 -332
- package/dist/bin/tools/interactionTools.js +0 -170
- package/dist/bin/tools/learnTools.js +0 -1818
- package/dist/bin/tools/notebookEditTools.js +0 -196
- package/dist/bin/tools/planningTools.js +0 -46
- package/dist/bin/tools/refactoringTools.js +0 -293
- package/dist/bin/tools/repoChecksTools.js +0 -160
- package/dist/bin/tools/searchTools.js +0 -206
- package/dist/bin/tools/skillTools.js +0 -177
- package/dist/bin/tools/taskManagementTools.js +0 -156
- package/dist/bin/tools/testingTools.js +0 -232
- package/dist/bin/tools/webTools.js +0 -480
- package/dist/bin/workspace.js +0 -106
- package/dist/bin/workspace.validator.js +0 -213
- package/dist/capabilities/offensiveSecurityCapability.d.ts +0 -26
- package/dist/capabilities/offensiveSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/offensiveSecurityCapability.js +0 -58
- package/dist/capabilities/offensiveSecurityCapability.js.map +0 -1
- package/dist/capabilities/realSecurityCapability.d.ts +0 -26
- package/dist/capabilities/realSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/realSecurityCapability.js +0 -53
- package/dist/capabilities/realSecurityCapability.js.map +0 -1
- package/dist/capabilities/securityCapability.d.ts +0 -32
- package/dist/capabilities/securityCapability.d.ts.map +0 -1
- package/dist/capabilities/securityCapability.js +0 -57
- package/dist/capabilities/securityCapability.js.map +0 -1
- package/dist/capabilities/ultimateSecurityCapability.d.ts +0 -42
- package/dist/capabilities/ultimateSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/ultimateSecurityCapability.js +0 -96
- package/dist/capabilities/ultimateSecurityCapability.js.map +0 -1
- package/dist/core/designThoughtCheck.d.ts +0 -196
- package/dist/core/designThoughtCheck.d.ts.map +0 -1
- package/dist/core/designThoughtCheck.js +0 -287
- package/dist/core/designThoughtCheck.js.map +0 -1
- package/dist/core/designThoughtCheckEngine.d.ts +0 -58
- package/dist/core/designThoughtCheckEngine.d.ts.map +0 -1
- package/dist/core/designThoughtCheckEngine.js +0 -358
- package/dist/core/designThoughtCheckEngine.js.map +0 -1
- package/dist/core/designThoughtCheckIntegration.d.ts +0 -103
- package/dist/core/designThoughtCheckIntegration.d.ts.map +0 -1
- package/dist/core/designThoughtCheckIntegration.js +0 -207
- package/dist/core/designThoughtCheckIntegration.js.map +0 -1
- package/dist/core/intelligenceTools.d.ts +0 -19
- package/dist/core/intelligenceTools.d.ts.map +0 -1
- package/dist/core/intelligenceTools.js +0 -453
- package/dist/core/intelligenceTools.js.map +0 -1
- package/dist/core/operationalTools.d.ts +0 -19
- package/dist/core/operationalTools.d.ts.map +0 -1
- package/dist/core/operationalTools.js +0 -467
- package/dist/core/operationalTools.js.map +0 -1
- package/dist/offensive/core/offensive-engine.d.ts +0 -171
- package/dist/offensive/core/offensive-engine.d.ts.map +0 -1
- package/dist/offensive/core/offensive-engine.js +0 -345
- package/dist/offensive/core/offensive-engine.js.map +0 -1
- package/dist/offensive/core/offensive-integration.d.ts +0 -129
- package/dist/offensive/core/offensive-integration.d.ts.map +0 -1
- package/dist/offensive/core/offensive-integration.js +0 -364
- package/dist/offensive/core/offensive-integration.js.map +0 -1
- package/dist/offensive/core/offensive-tools.d.ts +0 -55
- package/dist/offensive/core/offensive-tools.d.ts.map +0 -1
- package/dist/offensive/core/offensive-tools.js +0 -438
- package/dist/offensive/core/offensive-tools.js.map +0 -1
- package/dist/offensive/offensive-cli.d.ts +0 -48
- package/dist/offensive/offensive-cli.d.ts.map +0 -1
- package/dist/offensive/offensive-cli.js +0 -233
- package/dist/offensive/offensive-cli.js.map +0 -1
- package/dist/security/apt-simulation-cli.d.ts +0 -57
- package/dist/security/apt-simulation-cli.d.ts.map +0 -1
- package/dist/security/apt-simulation-cli.js +0 -278
- package/dist/security/apt-simulation-cli.js.map +0 -1
- package/dist/security/apt-simulation-engine-complete.d.ts +0 -97
- package/dist/security/apt-simulation-engine-complete.d.ts.map +0 -1
- package/dist/security/apt-simulation-engine-complete.js +0 -441
- package/dist/security/apt-simulation-engine-complete.js.map +0 -1
- package/dist/security/apt-simulation-engine.d.ts +0 -97
- package/dist/security/apt-simulation-engine.d.ts.map +0 -1
- package/dist/security/apt-simulation-engine.js +0 -441
- package/dist/security/apt-simulation-engine.js.map +0 -1
- package/dist/security/authorization.d.ts +0 -45
- package/dist/security/authorization.d.ts.map +0 -1
- package/dist/security/authorization.js +0 -128
- package/dist/security/authorization.js.map +0 -1
- package/dist/security/comprehensive-security-research.d.ts +0 -84
- package/dist/security/comprehensive-security-research.d.ts.map +0 -1
- package/dist/security/comprehensive-security-research.js +0 -211
- package/dist/security/comprehensive-security-research.js.map +0 -1
- package/dist/security/offensive/exploitationEngine.d.ts +0 -54
- package/dist/security/offensive/exploitationEngine.d.ts.map +0 -1
- package/dist/security/offensive/exploitationEngine.js +0 -263
- package/dist/security/offensive/exploitationEngine.js.map +0 -1
- package/dist/security/real/networkExploitation.d.ts +0 -92
- package/dist/security/real/networkExploitation.d.ts.map +0 -1
- package/dist/security/real/networkExploitation.js +0 -316
- package/dist/security/real/networkExploitation.js.map +0 -1
- package/dist/security/real/persistenceImplementation.d.ts +0 -62
- package/dist/security/real/persistenceImplementation.d.ts.map +0 -1
- package/dist/security/real/persistenceImplementation.js +0 -323
- package/dist/security/real/persistenceImplementation.js.map +0 -1
- package/dist/security/real/vulnerabilityScanner.d.ts +0 -73
- package/dist/security/real/vulnerabilityScanner.d.ts.map +0 -1
- package/dist/security/real/vulnerabilityScanner.js +0 -341
- package/dist/security/real/vulnerabilityScanner.js.map +0 -1
- package/dist/shell/capturePastePatch.d.ts +0 -9
- package/dist/shell/capturePastePatch.d.ts.map +0 -1
- package/dist/shell/capturePastePatch.js +0 -98
- package/dist/shell/capturePastePatch.js.map +0 -1
- package/dist/shell/enhancedInteractiveShell.d.ts +0 -90
- package/dist/shell/enhancedInteractiveShell.d.ts.map +0 -1
- package/dist/shell/enhancedInteractiveShell.js +0 -248
- package/dist/shell/enhancedInteractiveShell.js.map +0 -1
- package/dist/shell/inputProcessor.d.ts +0 -56
- package/dist/shell/inputProcessor.d.ts.map +0 -1
- package/dist/shell/inputProcessor.js +0 -172
- package/dist/shell/inputProcessor.js.map +0 -1
- package/dist/shell/interactiveShell-patch.d.ts +0 -27
- package/dist/shell/interactiveShell-patch.d.ts.map +0 -1
- package/dist/shell/interactiveShell-patch.js +0 -38
- package/dist/shell/interactiveShell-patch.js.map +0 -1
- package/dist/shell/interactiveShell-robust.d.ts +0 -26
- package/dist/shell/interactiveShell-robust.d.ts.map +0 -1
- package/dist/shell/interactiveShell-robust.js +0 -34
- package/dist/shell/interactiveShell-robust.js.map +0 -1
- package/dist/shell/multiLinePasteManager.d.ts +0 -106
- package/dist/shell/multiLinePasteManager.d.ts.map +0 -1
- package/dist/shell/multiLinePasteManager.js +0 -308
- package/dist/shell/multiLinePasteManager.js.map +0 -1
- package/dist/shell/processInputBlockPatch.d.ts +0 -8
- package/dist/shell/processInputBlockPatch.d.ts.map +0 -1
- package/dist/shell/processInputBlockPatch.js +0 -133
- package/dist/shell/processInputBlockPatch.js.map +0 -1
- package/dist/tools/enhancedSecurityTools.d.ts +0 -19
- package/dist/tools/enhancedSecurityTools.d.ts.map +0 -1
- package/dist/tools/enhancedSecurityTools.js +0 -215
- package/dist/tools/enhancedSecurityTools.js.map +0 -1
- package/dist/tools/offensiveSecurityTools.d.ts +0 -16
- package/dist/tools/offensiveSecurityTools.d.ts.map +0 -1
- package/dist/tools/offensiveSecurityTools.js +0 -285
- package/dist/tools/offensiveSecurityTools.js.map +0 -1
- package/dist/tools/realSecurityTools.d.ts +0 -18
- package/dist/tools/realSecurityTools.d.ts.map +0 -1
- package/dist/tools/realSecurityTools.js +0 -468
- package/dist/tools/realSecurityTools.js.map +0 -1
- package/dist/tools/securityTools.d.ts +0 -20
- package/dist/tools/securityTools.d.ts.map +0 -1
- package/dist/tools/securityTools.js +0 -449
- package/dist/tools/securityTools.js.map +0 -1
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EnhancedInteractiveShell - Improved shell with better multi-line paste UX
|
|
3
|
-
*
|
|
4
|
-
* Features:
|
|
5
|
-
* - Short block descriptions for pastes: "[Pasted: 15 lines]"
|
|
6
|
-
* - Full content sent to AI on Enter
|
|
7
|
-
* - Visual feedback during paste operations
|
|
8
|
-
* - Graceful handling of large pastes
|
|
9
|
-
*/
|
|
10
|
-
import readline from 'node:readline';
|
|
11
|
-
import { stdin as input, stdout as output } from 'node:process';
|
|
12
|
-
import { MultiLinePasteManager } from './multiLinePasteManager.js';
|
|
13
|
-
import { ComposableMessageBuilder } from './composableMessage.js';
|
|
14
|
-
import { display } from '../ui/display.js';
|
|
15
|
-
import { theme } from '../ui/theme.js';
|
|
16
|
-
const BRACKETED_PASTE_ENABLE = '\u001b[?2004h';
|
|
17
|
-
const BRACKETED_PASTE_DISABLE = '\u001b[?2004l';
|
|
18
|
-
export class EnhancedInteractiveShell {
|
|
19
|
-
rl;
|
|
20
|
-
pasteManager;
|
|
21
|
-
messageBuilder;
|
|
22
|
-
bracketedPasteEnabled = false;
|
|
23
|
-
currentPrompt = '';
|
|
24
|
-
onInputCallback = null;
|
|
25
|
-
onExitCallback = null;
|
|
26
|
-
constructor() {
|
|
27
|
-
this.pasteManager = new MultiLinePasteManager({
|
|
28
|
-
enabled: true,
|
|
29
|
-
maxPreviewLength: 60,
|
|
30
|
-
pasteThresholdMs: 50,
|
|
31
|
-
debug: false,
|
|
32
|
-
showVisualIndicators: true
|
|
33
|
-
});
|
|
34
|
-
this.messageBuilder = new ComposableMessageBuilder();
|
|
35
|
-
this.rl = readline.createInterface({
|
|
36
|
-
input,
|
|
37
|
-
output,
|
|
38
|
-
prompt: '',
|
|
39
|
-
terminal: true,
|
|
40
|
-
historySize: 1000
|
|
41
|
-
});
|
|
42
|
-
this.setupEventHandlers();
|
|
43
|
-
this.enableBracketedPasteMode();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Set up event handlers for the readline interface
|
|
47
|
-
*/
|
|
48
|
-
setupEventHandlers() {
|
|
49
|
-
this.rl.on('line', (line) => {
|
|
50
|
-
this.handleLineInput(line);
|
|
51
|
-
});
|
|
52
|
-
this.rl.on('close', () => {
|
|
53
|
-
this.handleClose();
|
|
54
|
-
});
|
|
55
|
-
// Handle raw input for paste detection
|
|
56
|
-
input.on('data', (data) => {
|
|
57
|
-
this.handleRawInput(data.toString());
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Handle raw input for paste detection
|
|
62
|
-
*/
|
|
63
|
-
handleRawInput(data) {
|
|
64
|
-
const result = this.pasteManager.process(data);
|
|
65
|
-
if (result.handled) {
|
|
66
|
-
if (result.isPending) {
|
|
67
|
-
// Show preview while paste is in progress
|
|
68
|
-
this.showPastePreview(result.preview || '');
|
|
69
|
-
}
|
|
70
|
-
else if (result.result) {
|
|
71
|
-
// Paste completed, add to message builder
|
|
72
|
-
this.messageBuilder.addPasteBlock(result.result);
|
|
73
|
-
this.showCurrentMessageState();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Handle line input (Enter key)
|
|
79
|
-
*/
|
|
80
|
-
handleLineInput(line) {
|
|
81
|
-
// Finalize any pending paste
|
|
82
|
-
const finalResult = this.pasteManager.finalize();
|
|
83
|
-
if (finalResult?.result) {
|
|
84
|
-
this.messageBuilder.addPasteBlock(finalResult.result);
|
|
85
|
-
}
|
|
86
|
-
// Add any typed text
|
|
87
|
-
if (line.trim()) {
|
|
88
|
-
this.messageBuilder.addTextBlock(line);
|
|
89
|
-
}
|
|
90
|
-
// If we have any content, send it
|
|
91
|
-
if (this.messageBuilder.hasContent()) {
|
|
92
|
-
const fullMessage = this.messageBuilder.assembleFullMessage();
|
|
93
|
-
// Show what's being sent
|
|
94
|
-
this.showSendingMessage(fullMessage);
|
|
95
|
-
// Send to AI
|
|
96
|
-
if (this.onInputCallback) {
|
|
97
|
-
this.onInputCallback(fullMessage);
|
|
98
|
-
}
|
|
99
|
-
// Reset for next input
|
|
100
|
-
this.messageBuilder.reset();
|
|
101
|
-
this.clearPastePreview();
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
// No content, just show prompt again
|
|
105
|
-
this.showPrompt();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Show preview of current paste operation
|
|
110
|
-
*/
|
|
111
|
-
showPastePreview(preview) {
|
|
112
|
-
// Clear current line and show preview
|
|
113
|
-
readline.clearLine(output, 0);
|
|
114
|
-
readline.cursorTo(output, 0);
|
|
115
|
-
const previewText = theme.pastePreview(preview);
|
|
116
|
-
output.write(previewText);
|
|
117
|
-
// Move cursor to next line for continued input
|
|
118
|
-
output.write('\n');
|
|
119
|
-
this.showPrompt();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Clear paste preview
|
|
123
|
-
*/
|
|
124
|
-
clearPastePreview() {
|
|
125
|
-
readline.clearLine(output, 0);
|
|
126
|
-
readline.cursorTo(output, 0);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Show current message state (text + paste blocks)
|
|
130
|
-
*/
|
|
131
|
-
showCurrentMessageState() {
|
|
132
|
-
const pasteChips = this.messageBuilder.formatPasteChips();
|
|
133
|
-
const currentDraft = this.messageBuilder.getCurrentDraft();
|
|
134
|
-
this.clearPastePreview();
|
|
135
|
-
if (pasteChips) {
|
|
136
|
-
const chipsText = theme.pasteChips(pasteChips);
|
|
137
|
-
output.write(chipsText + ' ');
|
|
138
|
-
}
|
|
139
|
-
if (currentDraft) {
|
|
140
|
-
output.write(currentDraft);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Show message being sent to AI
|
|
145
|
-
*/
|
|
146
|
-
showSendingMessage(message) {
|
|
147
|
-
const lines = message.split('\n');
|
|
148
|
-
const lineCount = lines.length;
|
|
149
|
-
this.clearPastePreview();
|
|
150
|
-
if (lineCount > 1) {
|
|
151
|
-
const firstLine = lines[0] ?? '';
|
|
152
|
-
const preview = firstLine.slice(0, 50) + (firstLine.length > 50 ? '...' : '');
|
|
153
|
-
display.showSystemMessage(`📤 Sending ${lineCount} lines to AI: "${preview}"`);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
display.showSystemMessage(`📤 Sending message to AI`);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Show the prompt
|
|
161
|
-
*/
|
|
162
|
-
showPrompt() {
|
|
163
|
-
this.currentPrompt = theme.prompt('> ');
|
|
164
|
-
this.rl.setPrompt(this.currentPrompt);
|
|
165
|
-
this.rl.prompt();
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Handle shell close
|
|
169
|
-
*/
|
|
170
|
-
handleClose() {
|
|
171
|
-
this.disableBracketedPasteMode();
|
|
172
|
-
if (this.onExitCallback) {
|
|
173
|
-
this.onExitCallback();
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Enable bracketed paste mode
|
|
178
|
-
*/
|
|
179
|
-
enableBracketedPasteMode() {
|
|
180
|
-
if (!input.isTTY || !output.isTTY) {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
try {
|
|
184
|
-
output.write(BRACKETED_PASTE_ENABLE);
|
|
185
|
-
this.bracketedPasteEnabled = true;
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
catch (error) {
|
|
189
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
190
|
-
display.showWarning(`Unable to enable bracketed paste: ${message}`);
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Disable bracketed paste mode
|
|
196
|
-
*/
|
|
197
|
-
disableBracketedPasteMode() {
|
|
198
|
-
if (!this.bracketedPasteEnabled || !output.isTTY) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
try {
|
|
202
|
-
output.write(BRACKETED_PASTE_DISABLE);
|
|
203
|
-
}
|
|
204
|
-
finally {
|
|
205
|
-
this.bracketedPasteEnabled = false;
|
|
206
|
-
this.pasteManager.reset();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Start the enhanced shell
|
|
211
|
-
*/
|
|
212
|
-
start() {
|
|
213
|
-
display.showSystemMessage('Enhanced interactive shell started with improved multi-line paste support');
|
|
214
|
-
this.showPrompt();
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Stop the shell
|
|
218
|
-
*/
|
|
219
|
-
stop() {
|
|
220
|
-
this.disableBracketedPasteMode();
|
|
221
|
-
this.rl.close();
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Set callback for user input
|
|
225
|
-
*/
|
|
226
|
-
onInput(callback) {
|
|
227
|
-
this.onInputCallback = callback;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Set callback for shell exit
|
|
231
|
-
*/
|
|
232
|
-
onExit(callback) {
|
|
233
|
-
this.onExitCallback = callback;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Get current paste manager for debugging
|
|
237
|
-
*/
|
|
238
|
-
getPasteManager() {
|
|
239
|
-
return this.pasteManager;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Get current message builder for debugging
|
|
243
|
-
*/
|
|
244
|
-
getMessageBuilder() {
|
|
245
|
-
return this.messageBuilder;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
//# sourceMappingURL=enhancedInteractiveShell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhancedInteractiveShell.js","sourceRoot":"","sources":["../../src/shell/enhancedInteractiveShell.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAC/C,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAEhD,MAAM,OAAO,wBAAwB;IAC3B,EAAE,CAAqB;IACvB,YAAY,CAAwB;IACpC,cAAc,CAA2B;IACzC,qBAAqB,GAAG,KAAK,CAAC;IAC9B,aAAa,GAAG,EAAE,CAAC;IACnB,eAAe,GAAqC,IAAI,CAAC;IACzD,cAAc,GAAwB,IAAI,CAAC;IAEnD;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;YACvE,OAAO,CAAC,WAAW,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;YACpE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;OAEG;IACK,yBAAyB;QAC/B,IAAI,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YACjD,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACxC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,CAAC,iBAAiB,CAAC,2EAA2E,CAAC,CAAC;QACvG,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,QAAiC;QACvC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAoB;QACzB,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Robust Input Processor for Erosolar CLI
|
|
3
|
-
*
|
|
4
|
-
* Fixes issues with:
|
|
5
|
-
* - Multi-line paste handling
|
|
6
|
-
* - Display formatting consistency
|
|
7
|
-
* - User input accuracy
|
|
8
|
-
* - Warning message placement
|
|
9
|
-
*/
|
|
10
|
-
export interface InputProcessingResult {
|
|
11
|
-
content: string;
|
|
12
|
-
isMultiLine: boolean;
|
|
13
|
-
lineCount: number;
|
|
14
|
-
displayFormat: 'inline' | 'block' | 'paste-chip';
|
|
15
|
-
summary?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class RobustInputProcessor {
|
|
18
|
-
private readonly MAX_INLINE_LINES;
|
|
19
|
-
private readonly MAX_SUMMARY_LENGTH;
|
|
20
|
-
/**
|
|
21
|
-
* Process user input with robust multi-line handling
|
|
22
|
-
*/
|
|
23
|
-
processInput(input: string): InputProcessingResult;
|
|
24
|
-
/**
|
|
25
|
-
* Determine the best display format for the input
|
|
26
|
-
*/
|
|
27
|
-
private determineDisplayFormat;
|
|
28
|
-
/**
|
|
29
|
-
* Generate appropriate summary based on display format
|
|
30
|
-
*/
|
|
31
|
-
private generateSummary;
|
|
32
|
-
/**
|
|
33
|
-
* Format content for display based on the determined format
|
|
34
|
-
*/
|
|
35
|
-
formatForDisplay(result: InputProcessingResult): string;
|
|
36
|
-
/**
|
|
37
|
-
* Check if input contains initialization warnings that should be handled.
|
|
38
|
-
* Only matches specific warning phrases with ellipsis to avoid false positives.
|
|
39
|
-
*/
|
|
40
|
-
containsInitializationWarning(input: string): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Extract actual content from input that may contain warnings
|
|
43
|
-
*/
|
|
44
|
-
extractContentFromWarning(input: string): {
|
|
45
|
-
content: string;
|
|
46
|
-
hadWarning: boolean;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Validate input for common issues
|
|
50
|
-
*/
|
|
51
|
-
validateInput(input: string): {
|
|
52
|
-
isValid: boolean;
|
|
53
|
-
issues: string[];
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=inputProcessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inputProcessor.d.ts","sourceRoot":"","sources":["../../src/shell/inputProcessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAK;IACtC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAM;IAEzC;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB;IA8BlD;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA8B9B;;OAEG;IACH,OAAO,CAAC,eAAe;IA6BvB;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM;IAsBvD;;;OAGG;IACH,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAYrD;;OAEG;IACH,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE;IAyBlF;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;CAwBrE"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Robust Input Processor for Erosolar CLI
|
|
3
|
-
*
|
|
4
|
-
* Fixes issues with:
|
|
5
|
-
* - Multi-line paste handling
|
|
6
|
-
* - Display formatting consistency
|
|
7
|
-
* - User input accuracy
|
|
8
|
-
* - Warning message placement
|
|
9
|
-
*/
|
|
10
|
-
export class RobustInputProcessor {
|
|
11
|
-
MAX_INLINE_LINES = 3;
|
|
12
|
-
MAX_SUMMARY_LENGTH = 80;
|
|
13
|
-
/**
|
|
14
|
-
* Process user input with robust multi-line handling
|
|
15
|
-
*/
|
|
16
|
-
processInput(input) {
|
|
17
|
-
const trimmed = input.trim();
|
|
18
|
-
const lines = trimmed.split('\n').filter(line => line.trim().length > 0);
|
|
19
|
-
const lineCount = lines.length;
|
|
20
|
-
// Handle empty input
|
|
21
|
-
if (lineCount === 0) {
|
|
22
|
-
return {
|
|
23
|
-
content: '',
|
|
24
|
-
isMultiLine: false,
|
|
25
|
-
lineCount: 0,
|
|
26
|
-
displayFormat: 'inline'
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
// Determine display format based on content characteristics
|
|
30
|
-
const displayFormat = this.determineDisplayFormat(trimmed, lineCount);
|
|
31
|
-
// Generate appropriate summary
|
|
32
|
-
const summary = this.generateSummary(lines, displayFormat);
|
|
33
|
-
return {
|
|
34
|
-
content: trimmed,
|
|
35
|
-
isMultiLine: lineCount > 1,
|
|
36
|
-
lineCount,
|
|
37
|
-
displayFormat,
|
|
38
|
-
summary
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Determine the best display format for the input
|
|
43
|
-
*/
|
|
44
|
-
determineDisplayFormat(content, lineCount) {
|
|
45
|
-
// Single line always inline
|
|
46
|
-
if (lineCount === 1) {
|
|
47
|
-
return 'inline';
|
|
48
|
-
}
|
|
49
|
-
// Short multi-line content can be inline
|
|
50
|
-
if (lineCount <= this.MAX_INLINE_LINES) {
|
|
51
|
-
const totalLength = content.length;
|
|
52
|
-
const avgLineLength = totalLength / lineCount;
|
|
53
|
-
// If lines are short, display inline with visual indicators
|
|
54
|
-
if (avgLineLength < 60) {
|
|
55
|
-
return 'inline';
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Long multi-line content gets block or paste-chip format
|
|
59
|
-
// Use paste-chip for very long content (> 10 lines)
|
|
60
|
-
if (lineCount > 10) {
|
|
61
|
-
return 'paste-chip';
|
|
62
|
-
}
|
|
63
|
-
// Moderate multi-line content gets block format
|
|
64
|
-
return 'block';
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Generate appropriate summary based on display format
|
|
68
|
-
*/
|
|
69
|
-
generateSummary(lines, displayFormat) {
|
|
70
|
-
if (displayFormat === 'inline') {
|
|
71
|
-
return undefined; // No summary needed for inline
|
|
72
|
-
}
|
|
73
|
-
if (displayFormat === 'paste-chip') {
|
|
74
|
-
const firstLine = lines[0] || '';
|
|
75
|
-
const truncated = firstLine.length > this.MAX_SUMMARY_LENGTH
|
|
76
|
-
? `${firstLine.slice(0, this.MAX_SUMMARY_LENGTH - 3)}...`
|
|
77
|
-
: firstLine;
|
|
78
|
-
return `[Pasted text +${lines.length} lines] ${truncated}`;
|
|
79
|
-
}
|
|
80
|
-
// Block format - show first line preview
|
|
81
|
-
if (lines.length > 0) {
|
|
82
|
-
const firstLine = lines[0] || '';
|
|
83
|
-
if (firstLine.length > this.MAX_SUMMARY_LENGTH) {
|
|
84
|
-
return `${firstLine.slice(0, this.MAX_SUMMARY_LENGTH - 3)}...`;
|
|
85
|
-
}
|
|
86
|
-
return firstLine;
|
|
87
|
-
}
|
|
88
|
-
return undefined;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Format content for display based on the determined format
|
|
92
|
-
*/
|
|
93
|
-
formatForDisplay(result) {
|
|
94
|
-
const { content, displayFormat, lineCount, summary } = result;
|
|
95
|
-
switch (displayFormat) {
|
|
96
|
-
case 'inline':
|
|
97
|
-
if (lineCount === 1) {
|
|
98
|
-
return content;
|
|
99
|
-
}
|
|
100
|
-
// Multi-line inline - join with visual indicators
|
|
101
|
-
return content.replace(/\n/g, ' ↵ ');
|
|
102
|
-
case 'block':
|
|
103
|
-
return content; // Return as-is for block display
|
|
104
|
-
case 'paste-chip':
|
|
105
|
-
return summary || `[Pasted text +${lineCount} lines]`;
|
|
106
|
-
default:
|
|
107
|
-
return content;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Check if input contains initialization warnings that should be handled.
|
|
112
|
-
* Only matches specific warning phrases with ellipsis to avoid false positives.
|
|
113
|
-
*/
|
|
114
|
-
containsInitializationWarning(input) {
|
|
115
|
-
const warningPatterns = [
|
|
116
|
-
/take a moment for complex initialization/i,
|
|
117
|
-
/initializing\.\.\./i,
|
|
118
|
-
/loading\.\.\./i,
|
|
119
|
-
/please wait\.\.\./i,
|
|
120
|
-
/starting up\.\.\./i
|
|
121
|
-
];
|
|
122
|
-
return warningPatterns.some(pattern => pattern.test(input));
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Extract actual content from input that may contain warnings
|
|
126
|
-
*/
|
|
127
|
-
extractContentFromWarning(input) {
|
|
128
|
-
const warningPatterns = [
|
|
129
|
-
/take a moment for complex initialization\.\.\.\s*/i,
|
|
130
|
-
/initializing\.\.\.\s*/i,
|
|
131
|
-
/loading\.\.\.\s*/i,
|
|
132
|
-
/please wait\.\.\.\s*/i,
|
|
133
|
-
/starting up\.\.\.\s*/i
|
|
134
|
-
];
|
|
135
|
-
let cleaned = input;
|
|
136
|
-
let hadWarning = false;
|
|
137
|
-
for (const pattern of warningPatterns) {
|
|
138
|
-
if (pattern.test(cleaned)) {
|
|
139
|
-
cleaned = cleaned.replace(pattern, '');
|
|
140
|
-
hadWarning = true;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return {
|
|
144
|
-
content: cleaned.trim(),
|
|
145
|
-
hadWarning
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Validate input for common issues
|
|
150
|
-
*/
|
|
151
|
-
validateInput(input) {
|
|
152
|
-
const issues = [];
|
|
153
|
-
// Check for empty input
|
|
154
|
-
if (!input.trim()) {
|
|
155
|
-
issues.push('Input is empty');
|
|
156
|
-
}
|
|
157
|
-
// Check for excessive length
|
|
158
|
-
if (input.length > 10000) {
|
|
159
|
-
issues.push('Input exceeds maximum length (10,000 characters)');
|
|
160
|
-
}
|
|
161
|
-
// Check for control characters that might cause issues
|
|
162
|
-
const controlChars = input.match(/[\x00-\x1F\x7F]/g);
|
|
163
|
-
if (controlChars && controlChars.length > 5) {
|
|
164
|
-
issues.push('Input contains excessive control characters');
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
isValid: issues.length === 0,
|
|
168
|
-
issues
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
//# sourceMappingURL=inputProcessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inputProcessor.js","sourceRoot":"","sources":["../../src/shell/inputProcessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,MAAM,OAAO,oBAAoB;IACd,gBAAgB,GAAG,CAAC,CAAC;IACrB,kBAAkB,GAAG,EAAE,CAAC;IAEzC;;OAEG;IACH,YAAY,CAAC,KAAa;QACxB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzE,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;QAE/B,qBAAqB;QACrB,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,KAAK;gBAClB,SAAS,EAAE,CAAC;gBACZ,aAAa,EAAE,QAAQ;aACxB,CAAC;QACJ,CAAC;QAED,4DAA4D;QAC5D,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAEtE,+BAA+B;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QAE3D,OAAO;YACL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|
-
export {};
|
|
5
|
-
/**
|
|
6
|
-
* Instructions for manual patching:
|
|
7
|
-
*
|
|
8
|
-
* 1. Add the imports at the top of src/shell/interactiveShell.ts:
|
|
9
|
-
* import { RobustInputProcessor } from './inputProcessor.js';
|
|
10
|
-
* import { createRobustCapturePaste, handleInlinePaste, handleBlockPaste, handlePasteChip } from './capturePastePatch.js';
|
|
11
|
-
* import { createRobustProcessInputBlock, handleComposableMessage, handleControlCommands } from './processInputBlockPatch.js';
|
|
12
|
-
*
|
|
13
|
-
* 2. Add this line around line 225 (after other private readonly properties):
|
|
14
|
-
* private readonly inputProcessor = new RobustInputProcessor();
|
|
15
|
-
*
|
|
16
|
-
* 3. Replace the capturePaste method (around line 1081) with:
|
|
17
|
-
* private capturePaste = createRobustCapturePaste(this.inputProcessor);
|
|
18
|
-
* private handleInlinePaste = handleInlinePaste;
|
|
19
|
-
* private handleBlockPaste = handleBlockPaste;
|
|
20
|
-
* private handlePasteChip = handlePasteChip;
|
|
21
|
-
*
|
|
22
|
-
* 4. Replace the processInputBlock method (around line 1211) with:
|
|
23
|
-
* private processInputBlock = createRobustProcessInputBlock(this.inputProcessor);
|
|
24
|
-
* private handleComposableMessage = handleComposableMessage;
|
|
25
|
-
* private handleControlCommands = handleControlCommands;
|
|
26
|
-
*/
|
|
27
|
-
//# sourceMappingURL=interactiveShell-patch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactiveShell-patch.d.ts","sourceRoot":"","sources":["../../src/shell/interactiveShell-patch.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAqBH;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Patch for InteractiveShell to add robust input processing
|
|
3
|
-
*/
|
|
4
|
-
export {};
|
|
5
|
-
// Add this property to the InteractiveShell class (around line 225)
|
|
6
|
-
// private readonly inputProcessor = new RobustInputProcessor();
|
|
7
|
-
// Replace the capturePaste method (around line 1081)
|
|
8
|
-
// private capturePaste = createRobustCapturePaste(this.inputProcessor);
|
|
9
|
-
// private handleInlinePaste = handleInlinePaste;
|
|
10
|
-
// private handleBlockPaste = handleBlockPaste;
|
|
11
|
-
// private handlePasteChip = handlePasteChip;
|
|
12
|
-
// Replace the processInputBlock method (around line 1211)
|
|
13
|
-
// private processInputBlock = createRobustProcessInputBlock(this.inputProcessor);
|
|
14
|
-
// private handleComposableMessage = handleComposableMessage;
|
|
15
|
-
// private handleControlCommands = handleControlCommands;
|
|
16
|
-
/**
|
|
17
|
-
* Instructions for manual patching:
|
|
18
|
-
*
|
|
19
|
-
* 1. Add the imports at the top of src/shell/interactiveShell.ts:
|
|
20
|
-
* import { RobustInputProcessor } from './inputProcessor.js';
|
|
21
|
-
* import { createRobustCapturePaste, handleInlinePaste, handleBlockPaste, handlePasteChip } from './capturePastePatch.js';
|
|
22
|
-
* import { createRobustProcessInputBlock, handleComposableMessage, handleControlCommands } from './processInputBlockPatch.js';
|
|
23
|
-
*
|
|
24
|
-
* 2. Add this line around line 225 (after other private readonly properties):
|
|
25
|
-
* private readonly inputProcessor = new RobustInputProcessor();
|
|
26
|
-
*
|
|
27
|
-
* 3. Replace the capturePaste method (around line 1081) with:
|
|
28
|
-
* private capturePaste = createRobustCapturePaste(this.inputProcessor);
|
|
29
|
-
* private handleInlinePaste = handleInlinePaste;
|
|
30
|
-
* private handleBlockPaste = handleBlockPaste;
|
|
31
|
-
* private handlePasteChip = handlePasteChip;
|
|
32
|
-
*
|
|
33
|
-
* 4. Replace the processInputBlock method (around line 1211) with:
|
|
34
|
-
* private processInputBlock = createRobustProcessInputBlock(this.inputProcessor);
|
|
35
|
-
* private handleComposableMessage = handleComposableMessage;
|
|
36
|
-
* private handleControlCommands = handleControlCommands;
|
|
37
|
-
*/
|
|
38
|
-
//# sourceMappingURL=interactiveShell-patch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactiveShell-patch.js","sourceRoot":"","sources":["../../src/shell/interactiveShell-patch.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAOH,oEAAoE;AACpE,gEAAgE;AAEhE,qDAAqD;AACrD,wEAAwE;AACxE,iDAAiD;AACjD,+CAA+C;AAC/C,6CAA6C;AAE7C,0DAA0D;AAC1D,kFAAkF;AAClF,6DAA6D;AAC7D,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interactive shell for Erosolar CLI with robust input processing
|
|
3
|
-
*/
|
|
4
|
-
export declare class InteractiveShell {
|
|
5
|
-
private readonly rl;
|
|
6
|
-
private readonly profile;
|
|
7
|
-
private readonly profileLabel;
|
|
8
|
-
private readonly workingDir;
|
|
9
|
-
private readonly runtimeSession;
|
|
10
|
-
private readonly uiAdapter;
|
|
11
|
-
private readonly persistentPrompt;
|
|
12
|
-
private readonly bracketedPaste;
|
|
13
|
-
private readonly inputProcessor;
|
|
14
|
-
private readonly composableMessage;
|
|
15
|
-
/**
|
|
16
|
-
* Robust input processing methods
|
|
17
|
-
*/
|
|
18
|
-
private capturePaste;
|
|
19
|
-
private handleInlinePaste;
|
|
20
|
-
private handleBlockPaste;
|
|
21
|
-
private handlePasteChip;
|
|
22
|
-
private processInputBlock;
|
|
23
|
-
private handleComposableMessage;
|
|
24
|
-
private handleControlCommands;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=interactiveShell-robust.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactiveShell-robust.d.ts","sourceRoot":"","sources":["../../src/shell/interactiveShell-robust.ts"],"names":[],"mappings":"AA0DA;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAGvD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8B;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IAIpE;;OAEG;IACH,OAAO,CAAC,YAAY,CAAiD;IACrE,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,gBAAgB,CAAoB;IAC5C,OAAO,CAAC,eAAe,CAAmB;IAC1C,OAAO,CAAC,iBAAiB,CAAsD;IAC/E,OAAO,CAAC,uBAAuB,CAA2B;IAC1D,OAAO,CAAC,qBAAqB,CAAyB;CAGvD"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ComposableMessageBuilder } from './composableMessage.js';
|
|
2
|
-
// Import our robust input processing components
|
|
3
|
-
import { RobustInputProcessor } from './inputProcessor.js';
|
|
4
|
-
import { createRobustCapturePaste, handleInlinePaste, handleBlockPaste, handlePasteChip } from './capturePastePatch.js';
|
|
5
|
-
import { createRobustProcessInputBlock, handleComposableMessage, handleControlCommands } from './processInputBlockPatch.js';
|
|
6
|
-
// ... [rest of the imports]
|
|
7
|
-
/**
|
|
8
|
-
* Interactive shell for Erosolar CLI with robust input processing
|
|
9
|
-
*/
|
|
10
|
-
export class InteractiveShell {
|
|
11
|
-
rl;
|
|
12
|
-
profile;
|
|
13
|
-
profileLabel;
|
|
14
|
-
workingDir;
|
|
15
|
-
runtimeSession;
|
|
16
|
-
uiAdapter;
|
|
17
|
-
persistentPrompt;
|
|
18
|
-
bracketedPaste;
|
|
19
|
-
// Robust input processing components
|
|
20
|
-
inputProcessor = new RobustInputProcessor();
|
|
21
|
-
composableMessage = new ComposableMessageBuilder();
|
|
22
|
-
// ... [other properties]
|
|
23
|
-
/**
|
|
24
|
-
* Robust input processing methods
|
|
25
|
-
*/
|
|
26
|
-
capturePaste = createRobustCapturePaste(this.inputProcessor);
|
|
27
|
-
handleInlinePaste = handleInlinePaste;
|
|
28
|
-
handleBlockPaste = handleBlockPaste;
|
|
29
|
-
handlePasteChip = handlePasteChip;
|
|
30
|
-
processInputBlock = createRobustProcessInputBlock(this.inputProcessor);
|
|
31
|
-
handleComposableMessage = handleComposableMessage;
|
|
32
|
-
handleControlCommands = handleControlCommands;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=interactiveShell-robust.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactiveShell-robust.js","sourceRoot":"","sources":["../../src/shell/interactiveShell-robust.ts"],"names":[],"mappings":"AA8CA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAKlE,gDAAgD;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxH,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE5H,4BAA4B;AAE5B;;GAEG;AACH,MAAM,OAAO,gBAAgB;IACV,EAAE,CAAqB;IACvB,OAAO,CAAc;IACrB,YAAY,CAAS;IACrB,UAAU,CAAS;IACnB,cAAc,CAAe;IAC7B,SAAS,CAAiB;IAC1B,gBAAgB,CAAmB;IACnC,cAAc,CAAwB;IAEvD,qCAAqC;IACpB,cAAc,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC5C,iBAAiB,GAAG,IAAI,wBAAwB,EAAE,CAAC;IAEpE,yBAAyB;IAEzB;;OAEG;IACK,YAAY,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7D,iBAAiB,GAAG,iBAAiB,CAAC;IACtC,gBAAgB,GAAG,gBAAgB,CAAC;IACpC,eAAe,GAAG,eAAe,CAAC;IAClC,iBAAiB,GAAG,6BAA6B,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACvE,uBAAuB,GAAG,uBAAuB,CAAC;IAClD,qBAAqB,GAAG,qBAAqB,CAAC;CAGvD"}
|