erosolar-cli 1.7.27 → 1.7.29

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 (92) hide show
  1. package/dist/browser/BrowserSessionManager.js +1 -1
  2. package/dist/browser/BrowserSessionManager.js.map +1 -1
  3. package/dist/core/agent.d.ts +3 -3
  4. package/dist/core/agent.d.ts.map +1 -1
  5. package/dist/core/agent.js +57 -4
  6. package/dist/core/agent.js.map +1 -1
  7. package/dist/core/agentRulebook.js +1 -1
  8. package/dist/core/agentRulebook.js.map +1 -1
  9. package/dist/core/contextManager.js +2 -2
  10. package/dist/core/contextManager.js.map +1 -1
  11. package/dist/core/designThoughtCheck.d.ts +196 -0
  12. package/dist/core/designThoughtCheck.d.ts.map +1 -0
  13. package/dist/core/designThoughtCheck.js +287 -0
  14. package/dist/core/designThoughtCheck.js.map +1 -0
  15. package/dist/core/designThoughtCheckEngine.d.ts +58 -0
  16. package/dist/core/designThoughtCheckEngine.d.ts.map +1 -0
  17. package/dist/core/designThoughtCheckEngine.js +358 -0
  18. package/dist/core/designThoughtCheckEngine.js.map +1 -0
  19. package/dist/core/designThoughtCheckIntegration.d.ts +103 -0
  20. package/dist/core/designThoughtCheckIntegration.d.ts.map +1 -0
  21. package/dist/core/designThoughtCheckIntegration.js +207 -0
  22. package/dist/core/designThoughtCheckIntegration.js.map +1 -0
  23. package/dist/core/isolatedVerifier.d.ts +18 -0
  24. package/dist/core/isolatedVerifier.d.ts.map +1 -0
  25. package/dist/core/isolatedVerifier.js +349 -0
  26. package/dist/core/isolatedVerifier.js.map +1 -0
  27. package/dist/core/responseVerifier.d.ts +11 -2
  28. package/dist/core/responseVerifier.d.ts.map +1 -1
  29. package/dist/core/responseVerifier.js +108 -73
  30. package/dist/core/responseVerifier.js.map +1 -1
  31. package/dist/intelligence/testGenerator.js +2 -2
  32. package/dist/intelligence/testGenerator.js.map +1 -1
  33. package/dist/providers/openaiChatCompletionsProvider.js +5 -5
  34. package/dist/providers/openaiChatCompletionsProvider.js.map +1 -1
  35. package/dist/security/active-stack-security.js +2 -2
  36. package/dist/security/active-stack-security.js.map +1 -1
  37. package/dist/shell/bracketedPasteManager.enhanced.d.ts +2 -0
  38. package/dist/shell/bracketedPasteManager.enhanced.d.ts.map +1 -0
  39. package/dist/shell/bracketedPasteManager.enhanced.js +4 -0
  40. package/dist/shell/bracketedPasteManager.enhanced.js.map +1 -0
  41. package/dist/shell/inputProcessor.js +2 -2
  42. package/dist/shell/inputProcessor.js.map +1 -1
  43. package/dist/shell/interactiveShell.d.ts +16 -2
  44. package/dist/shell/interactiveShell.d.ts.map +1 -1
  45. package/dist/shell/interactiveShell.js +81 -22
  46. package/dist/shell/interactiveShell.js.map +1 -1
  47. package/dist/tools/cloudTools.js +2 -2
  48. package/dist/tools/cloudTools.js.map +1 -1
  49. package/dist/tools/devTools.js +2 -2
  50. package/dist/tools/devTools.js.map +1 -1
  51. package/dist/tools/diffUtils.js +22 -2
  52. package/dist/tools/diffUtils.js.map +1 -1
  53. package/dist/tools/fileTools.d.ts.map +1 -1
  54. package/dist/tools/fileTools.js +20 -2
  55. package/dist/tools/fileTools.js.map +1 -1
  56. package/dist/tools/frontendTestingTools.js +1 -1
  57. package/dist/tools/frontendTestingTools.js.map +1 -1
  58. package/dist/tools/globTools.js +1 -1
  59. package/dist/tools/globTools.js.map +1 -1
  60. package/dist/tools/grepTools.js +1 -1
  61. package/dist/tools/grepTools.js.map +1 -1
  62. package/dist/tools/webTools.js +2 -2
  63. package/dist/tools/webTools.js.map +1 -1
  64. package/dist/ui/ShellUIAdapter.d.ts +5 -0
  65. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  66. package/dist/ui/ShellUIAdapter.js +30 -7
  67. package/dist/ui/ShellUIAdapter.js.map +1 -1
  68. package/dist/ui/advancedTheme.js +1 -1
  69. package/dist/ui/advancedTheme.js.map +1 -1
  70. package/dist/ui/diffViewer.js +1 -1
  71. package/dist/ui/diffViewer.js.map +1 -1
  72. package/dist/ui/display.js +3 -3
  73. package/dist/ui/display.js.map +1 -1
  74. package/dist/ui/logFormatter.js +1 -1
  75. package/dist/ui/logFormatter.js.map +1 -1
  76. package/dist/ui/outputSummarizer.js +6 -7
  77. package/dist/ui/outputSummarizer.js.map +1 -1
  78. package/dist/ui/persistentPrompt.js +4 -4
  79. package/dist/ui/persistentPrompt.js.map +1 -1
  80. package/dist/ui/tableFormatter.js +4 -4
  81. package/dist/ui/tableFormatter.js.map +1 -1
  82. package/dist/ui/textHighlighter.js +2 -2
  83. package/dist/ui/textHighlighter.js.map +1 -1
  84. package/dist/ui/toolDisplay.d.ts +18 -0
  85. package/dist/ui/toolDisplay.d.ts.map +1 -1
  86. package/dist/ui/toolDisplay.js +922 -6
  87. package/dist/ui/toolDisplay.js.map +1 -1
  88. package/dist/ui/treeVisualizer.js +1 -1
  89. package/dist/ui/treeVisualizer.js.map +1 -1
  90. package/package.json +12 -3
  91. package/scripts/isolated-verification-runner.mjs +364 -0
  92. package/scripts/isolated-verification-wrapper.mjs +276 -0
@@ -0,0 +1,276 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * ISOLATED VERIFICATION WRAPPER
5
+ *
6
+ * This script provides a clean interface between the main CLI and the
7
+ * isolated verification runner. It:
8
+ * - Spawns completely separate processes for verification
9
+ * - Handles communication via stdin/stdout
10
+ * - Provides structured results to the main CLI
11
+ * - Ensures no shared state between verification and main runtime
12
+ *
13
+ * USAGE: node scripts/isolated-verification-wrapper.mjs <command>
14
+ */
15
+
16
+ import { spawn } from 'node:child_process';
17
+ import { readFileSync } from 'node:fs';
18
+ import { fileURLToPath } from 'node:url';
19
+ import { dirname, join } from 'node:path';
20
+
21
+ const __dirname = dirname(fileURLToPath(import.meta.url));
22
+
23
+ // ============================================================================
24
+ // VERIFICATION INTERFACE
25
+ // ============================================================================
26
+
27
+ class IsolatedVerificationWrapper {
28
+ constructor() {
29
+ this.verifierPath = join(__dirname, 'isolated-verification-runner.mjs');
30
+ }
31
+
32
+ /**
33
+ * Verify task completion in isolated process
34
+ */
35
+ async verifyTaskCompletion(taskDescription, changes = {}) {
36
+ console.log('šŸš€ LAUNCHING ISOLATED VERIFICATION');
37
+ console.log('===================================');
38
+
39
+ return new Promise((resolve, reject) => {
40
+ const child = spawn(process.execPath, [
41
+ this.verifierPath,
42
+ 'task',
43
+ taskDescription
44
+ ], {
45
+ stdio: ['pipe', 'pipe', 'pipe'],
46
+ cwd: process.cwd(),
47
+ env: {
48
+ ...process.env,
49
+ // Ensure complete isolation
50
+ NODE_NO_WARNINGS: '1',
51
+ VERIFICATION_ISOLATED: 'true',
52
+ // Prevent any shared module cache
53
+ NODE_OPTIONS: '--max-old-space-size=512 --no-warnings'
54
+ }
55
+ });
56
+
57
+ let stdout = '';
58
+ let stderr = '';
59
+
60
+ child.stdout.on('data', (data) => {
61
+ stdout += data.toString();
62
+ });
63
+
64
+ child.stderr.on('data', (data) => {
65
+ stderr += data.toString();
66
+ });
67
+
68
+ child.on('close', (code) => {
69
+ try {
70
+ if (code === 0) {
71
+ const result = JSON.parse(stdout);
72
+ resolve(result);
73
+ } else {
74
+ reject(new Error(`Verification failed with code ${code}: ${stderr}`));
75
+ }
76
+ } catch (error) {
77
+ reject(new Error(`Failed to parse verification result: ${error.message}`));
78
+ }
79
+ });
80
+
81
+ child.on('error', (error) => {
82
+ reject(new Error(`Failed to spawn verification process: ${error.message}`));
83
+ });
84
+ });
85
+ }
86
+
87
+ /**
88
+ * Verify build system in isolated process
89
+ */
90
+ async verifyBuildSystem() {
91
+ return this.runIsolatedVerification('build');
92
+ }
93
+
94
+ /**
95
+ * Verify test system in isolated process
96
+ */
97
+ async verifyTestSystem() {
98
+ return this.runIsolatedVerification('test');
99
+ }
100
+
101
+ /**
102
+ * Verify health check in isolated process
103
+ */
104
+ async verifyHealthCheck() {
105
+ return this.runIsolatedVerification('health');
106
+ }
107
+
108
+ /**
109
+ * Generic isolated verification runner
110
+ */
111
+ async runIsolatedVerification(type) {
112
+ return new Promise((resolve, reject) => {
113
+ const child = spawn(process.execPath, [
114
+ this.verifierPath,
115
+ type
116
+ ], {
117
+ stdio: ['pipe', 'pipe', 'pipe'],
118
+ cwd: process.cwd(),
119
+ env: {
120
+ ...process.env,
121
+ NODE_NO_WARNINGS: '1',
122
+ VERIFICATION_ISOLATED: 'true',
123
+ NODE_OPTIONS: '--max-old-space-size=512'
124
+ }
125
+ });
126
+
127
+ let stdout = '';
128
+ let stderr = '';
129
+
130
+ child.stdout.on('data', (data) => {
131
+ stdout += data.toString();
132
+ });
133
+
134
+ child.stderr.on('data', (data) => {
135
+ stderr += data.toString();
136
+ });
137
+
138
+ child.on('close', (code) => {
139
+ if (code === 0) {
140
+ try {
141
+ const result = JSON.parse(stdout);
142
+ resolve(result);
143
+ } catch (error) {
144
+ resolve({ success: true, output: stdout });
145
+ }
146
+ } else {
147
+ reject(new Error(`Verification failed: ${stderr}`));
148
+ }
149
+ });
150
+
151
+ child.on('error', (error) => {
152
+ reject(new Error(`Failed to spawn verification: ${error.message}`));
153
+ });
154
+ });
155
+ }
156
+
157
+ /**
158
+ * Generate human-readable verification report
159
+ */
160
+ generateReport(result) {
161
+ let report = '\nšŸ“Š ISOLATED VERIFICATION REPORT\n';
162
+ report += '================================\n\n';
163
+
164
+ if (result.overallStatus) {
165
+ const statusIcon = result.overallStatus === 'SUCCESS' ? 'āœ…' :
166
+ result.overallStatus === 'PARTIAL_SUCCESS' ? 'āš ļø' : 'āŒ';
167
+ report += `${statusIcon} OVERALL STATUS: ${result.overallStatus}\n\n`;
168
+ }
169
+
170
+ if (result.verificationSteps) {
171
+ report += 'šŸ” VERIFICATION STEPS:\n';
172
+ result.verificationSteps.forEach((step, index) => {
173
+ const stepIcon = step.success ? 'āœ…' : step.critical ? 'āŒ' : 'āš ļø';
174
+ report += ` ${stepIcon} ${step.name}\n`;
175
+ if (step.details) {
176
+ const lines = step.details.split('\n').slice(0, 3);
177
+ lines.forEach(line => {
178
+ if (line.trim()) report += ` ${line}\n`;
179
+ });
180
+ }
181
+ });
182
+ }
183
+
184
+ if (result.success !== undefined) {
185
+ const icon = result.success ? 'āœ…' : 'āŒ';
186
+ report += `\n${icon} VERIFICATION: ${result.success ? 'PASSED' : 'FAILED'}\n`;
187
+ }
188
+
189
+ report += '\nšŸ”’ VERIFICATION ISOLATION: COMPLETE\n';
190
+ report += ' • Separate Node.js process\n';
191
+ report += ' • Independent memory space\n';
192
+ report += ' • No shared state with main CLI\n';
193
+
194
+ return report;
195
+ }
196
+ }
197
+
198
+ // ============================================================================
199
+ // CLI INTERFACE
200
+ // ============================================================================
201
+
202
+ /**
203
+ * Main CLI entry point
204
+ */
205
+ async function main() {
206
+ const args = process.argv.slice(2);
207
+
208
+ if (args.length === 0) {
209
+ console.error('Usage: node scripts/isolated-verification-wrapper.mjs <command> [args...]');
210
+ console.error('');
211
+ console.error('Commands:');
212
+ console.error(' task <description> - Verify task completion');
213
+ console.error(' build - Verify build system');
214
+ console.error(' test - Verify test system');
215
+ console.error(' health - Verify health check');
216
+ console.error('');
217
+ console.error('Example:');
218
+ console.error(' node scripts/isolated-verification-wrapper.mjs task "Fix verification system"');
219
+ process.exit(1);
220
+ }
221
+
222
+ const wrapper = new IsolatedVerificationWrapper();
223
+ const command = args[0];
224
+
225
+ try {
226
+ let result;
227
+
228
+ switch (command) {
229
+ case 'task':
230
+ const taskDescription = args.slice(1).join(' ') || 'Unknown task';
231
+ result = await wrapper.verifyTaskCompletion(taskDescription);
232
+ break;
233
+
234
+ case 'build':
235
+ result = await wrapper.verifyBuildSystem();
236
+ break;
237
+
238
+ case 'test':
239
+ result = await wrapper.verifyTestSystem();
240
+ break;
241
+
242
+ case 'health':
243
+ result = await wrapper.verifyHealthCheck();
244
+ break;
245
+
246
+ default:
247
+ console.error(`Unknown command: ${command}`);
248
+ process.exit(1);
249
+ }
250
+
251
+ // Generate and display report
252
+ const report = wrapper.generateReport(result);
253
+ console.log(report);
254
+
255
+ // Exit with appropriate code
256
+ // Only exit with error if critical verification fails
257
+ const success = result.overallStatus !== 'FAILED' &&
258
+ !(result.success === false && result.critical);
259
+ process.exit(success ? 0 : 1);
260
+
261
+ } catch (error) {
262
+ console.error('āŒ Verification wrapper failed:', error.message);
263
+ process.exit(1);
264
+ }
265
+ }
266
+
267
+ // Run if called directly
268
+ if (import.meta.url === `file://${process.argv[1]}`) {
269
+ main().catch(error => {
270
+ console.error('Fatal error in verification wrapper:', error);
271
+ process.exit(1);
272
+ });
273
+ }
274
+
275
+ // Export for use in main CLI
276
+ export { IsolatedVerificationWrapper };