erosolar-cli 2.0.5 → 2.1.1
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/agents/erosolar-security.rules.json +147 -0
- package/dist/capabilities/enhancedAnalysisCapability.d.ts +13 -0
- package/dist/capabilities/enhancedAnalysisCapability.d.ts.map +1 -0
- package/dist/capabilities/enhancedAnalysisCapability.js +20 -0
- package/dist/capabilities/enhancedAnalysisCapability.js.map +1 -0
- package/dist/capabilities/offsecOpsCapability.d.ts +6 -0
- package/dist/capabilities/offsecOpsCapability.d.ts.map +1 -0
- package/dist/capabilities/offsecOpsCapability.js +20 -0
- package/dist/capabilities/offsecOpsCapability.js.map +1 -0
- package/dist/capabilities/offsecSearchCapability.d.ts +12 -0
- package/dist/capabilities/offsecSearchCapability.d.ts.map +1 -0
- package/dist/capabilities/offsecSearchCapability.js +27 -0
- package/dist/capabilities/offsecSearchCapability.js.map +1 -0
- package/dist/capabilities/taoCapability.d.ts +6 -0
- package/dist/capabilities/taoCapability.d.ts.map +1 -0
- package/dist/capabilities/taoCapability.js +20 -0
- package/dist/capabilities/taoCapability.js.map +1 -0
- package/dist/capabilities/toolRegistry.d.ts +2 -1
- package/dist/capabilities/toolRegistry.d.ts.map +1 -1
- package/dist/capabilities/toolRegistry.js +6 -1
- package/dist/capabilities/toolRegistry.js.map +1 -1
- package/dist/contracts/agent-schemas.json +18 -19
- package/dist/contracts/tools.schema.json +38 -8
- package/dist/core/contextManager.d.ts +8 -2
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js +15 -2
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/deepBugAnalyzer.d.ts +128 -0
- package/dist/core/deepBugAnalyzer.d.ts.map +1 -0
- package/dist/core/deepBugAnalyzer.js +406 -0
- package/dist/core/deepBugAnalyzer.js.map +1 -0
- package/dist/core/hypothesisEngine.d.ts +113 -0
- package/dist/core/hypothesisEngine.d.ts.map +1 -0
- package/dist/core/hypothesisEngine.js +264 -0
- package/dist/core/hypothesisEngine.js.map +1 -0
- package/dist/core/intelligentSummarizer.d.ts +79 -0
- package/dist/core/intelligentSummarizer.d.ts.map +1 -0
- package/dist/core/intelligentSummarizer.js +273 -0
- package/dist/core/intelligentSummarizer.js.map +1 -0
- package/dist/core/offsecAlphaZero.d.ts +3 -0
- package/dist/core/offsecAlphaZero.d.ts.map +1 -1
- package/dist/core/offsecAlphaZero.js +166 -5
- package/dist/core/offsecAlphaZero.js.map +1 -1
- package/dist/core/productTestHarness.d.ts +113 -0
- package/dist/core/productTestHarness.d.ts.map +1 -0
- package/dist/core/productTestHarness.js +345 -0
- package/dist/core/productTestHarness.js.map +1 -0
- package/dist/core/toolPatternAnalyzer.d.ts +87 -0
- package/dist/core/toolPatternAnalyzer.d.ts.map +1 -0
- package/dist/core/toolPatternAnalyzer.js +272 -0
- package/dist/core/toolPatternAnalyzer.js.map +1 -0
- package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.d.ts +3 -0
- package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.js +14 -0
- package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.js.map +1 -0
- package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.d.ts +3 -0
- package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.d.ts.map +1 -0
- package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.js +12 -0
- package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.js.map +1 -0
- package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.d.ts +3 -0
- package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.js +12 -0
- package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.js.map +1 -0
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
- package/dist/plugins/tools/nodeDefaults.js +12 -0
- package/dist/plugins/tools/nodeDefaults.js.map +1 -1
- package/dist/plugins/tools/offsec/offsecOpsPlugin.d.ts +3 -0
- package/dist/plugins/tools/offsec/offsecOpsPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/offsec/offsecOpsPlugin.js +10 -0
- package/dist/plugins/tools/offsec/offsecOpsPlugin.js.map +1 -0
- package/dist/plugins/tools/offsec/offsecSearchPlugin.d.ts +3 -0
- package/dist/plugins/tools/offsec/offsecSearchPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/offsec/offsecSearchPlugin.js +12 -0
- package/dist/plugins/tools/offsec/offsecSearchPlugin.js.map +1 -0
- package/dist/plugins/tools/tao/taoPlugin.d.ts +3 -0
- package/dist/plugins/tools/tao/taoPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/tao/taoPlugin.js +10 -0
- package/dist/plugins/tools/tao/taoPlugin.js.map +1 -0
- package/dist/shell/interactiveShell.d.ts +6 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +50 -15
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/shellApp.js +1 -1
- package/dist/shell/shellApp.js.map +1 -1
- package/dist/shell/systemPrompt.d.ts.map +1 -1
- package/dist/shell/systemPrompt.js +3 -0
- package/dist/shell/systemPrompt.js.map +1 -1
- package/dist/tools/enhancedAnalysisTools.d.ts +9 -0
- package/dist/tools/enhancedAnalysisTools.d.ts.map +1 -0
- package/dist/tools/enhancedAnalysisTools.js +382 -0
- package/dist/tools/enhancedAnalysisTools.js.map +1 -0
- package/dist/tools/enhancedCodeIntelligenceTools.d.ts +1 -21
- package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +1 -1
- package/dist/tools/enhancedCodeIntelligenceTools.js +378 -256
- package/dist/tools/enhancedCodeIntelligenceTools.js.map +1 -1
- package/dist/tools/enhancedDevWorkflowTools.d.ts +2 -10
- package/dist/tools/enhancedDevWorkflowTools.d.ts.map +1 -1
- package/dist/tools/enhancedDevWorkflowTools.js +293 -165
- package/dist/tools/enhancedDevWorkflowTools.js.map +1 -1
- package/dist/tools/interactionTools.d.ts.map +1 -1
- package/dist/tools/interactionTools.js +55 -0
- package/dist/tools/interactionTools.js.map +1 -1
- package/dist/tools/offsec/offsecOperationsTools.d.ts +3 -0
- package/dist/tools/offsec/offsecOperationsTools.d.ts.map +1 -0
- package/dist/tools/offsec/offsecOperationsTools.js +333 -0
- package/dist/tools/offsec/offsecOperationsTools.js.map +1 -0
- package/dist/tools/offsecSearchTools.d.ts +3 -0
- package/dist/tools/offsecSearchTools.d.ts.map +1 -0
- package/dist/tools/offsecSearchTools.js +330 -0
- package/dist/tools/offsecSearchTools.js.map +1 -0
- package/dist/tools/taoOperations.d.ts +7 -0
- package/dist/tools/taoOperations.d.ts.map +1 -0
- package/dist/tools/taoOperations.js +744 -0
- package/dist/tools/taoOperations.js.map +1 -0
- package/dist/ui/ShellUIAdapter.d.ts +10 -6
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +68 -66
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/globalWriteLock.d.ts.map +1 -1
- package/dist/ui/globalWriteLock.js +6 -0
- package/dist/ui/globalWriteLock.js.map +1 -1
- package/dist/ui/streamingFormatter.d.ts +11 -0
- package/dist/ui/streamingFormatter.d.ts.map +1 -1
- package/dist/ui/streamingFormatter.js +27 -1
- package/dist/ui/streamingFormatter.js.map +1 -1
- package/package.json +4 -13
|
@@ -36,8 +36,7 @@ import { analyzeTokenUsage, discoverModularTargets, getModularStatusDisplay, gen
|
|
|
36
36
|
import { startOffsecRun, resumeOffsecRun, recordOffsecOutcome, getOffsecNextActions, simulateOffsecRollout, formatOffsecStatus, listOffsecRuns, } from '../core/offsecAlphaZero.js';
|
|
37
37
|
import { generateTestFlows, detectBugs, detectUIUpdates, saveTestFlows, saveBugReports, saveUIUpdates, getTestFlowStatus, } from '../core/intelligentTestFlows.js';
|
|
38
38
|
import { PromptController } from '../ui/PromptController.js';
|
|
39
|
-
import {
|
|
40
|
-
import { enterStreamingMode, exitStreamingMode } from '../ui/globalWriteLock.js';
|
|
39
|
+
import { enterStreamingMode, exitStreamingMode, isStreamingMode } from '../ui/globalWriteLock.js';
|
|
41
40
|
import { setGlobalAIEnhancer } from '../tools/localExplore.js';
|
|
42
41
|
import { createProvider } from '../providers/providerFactory.js';
|
|
43
42
|
import { getParallelAgentManager } from '../subagents/parallelAgentManager.js';
|
|
@@ -176,6 +175,8 @@ export class InteractiveShell {
|
|
|
176
175
|
alternateScreenEnabled;
|
|
177
176
|
welcomeShown = false;
|
|
178
177
|
renderer;
|
|
178
|
+
// Message queue for streaming mode coordination - prevents race conditions
|
|
179
|
+
pendingMessages = [];
|
|
179
180
|
constructor(config) {
|
|
180
181
|
this.profile = config.profile;
|
|
181
182
|
this.profileLabel = config.profileLabel;
|
|
@@ -970,7 +971,7 @@ export class InteractiveShell {
|
|
|
970
971
|
return;
|
|
971
972
|
}
|
|
972
973
|
if (normalized === 'defaults') {
|
|
973
|
-
pending.selection = buildEnabledToolSet(null);
|
|
974
|
+
pending.selection = buildEnabledToolSet(null, this.profile);
|
|
974
975
|
this.renderToolMenu(pending);
|
|
975
976
|
this.syncRendererInput();
|
|
976
977
|
return;
|
|
@@ -1012,7 +1013,7 @@ export class InteractiveShell {
|
|
|
1012
1013
|
display.showInfo('No changes to save.');
|
|
1013
1014
|
return;
|
|
1014
1015
|
}
|
|
1015
|
-
const defaults = buildEnabledToolSet(null);
|
|
1016
|
+
const defaults = buildEnabledToolSet(null, this.profile);
|
|
1016
1017
|
if (setsEqual(interaction.selection, defaults)) {
|
|
1017
1018
|
clearToolSettings();
|
|
1018
1019
|
display.showInfo('Tool settings cleared. Defaults will be used on the next launch.');
|
|
@@ -1332,15 +1333,46 @@ export class InteractiveShell {
|
|
|
1332
1333
|
if (!content) {
|
|
1333
1334
|
return;
|
|
1334
1335
|
}
|
|
1335
|
-
|
|
1336
|
-
//
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1336
|
+
const payload = content.endsWith('\n') ? content : `${content}\n`;
|
|
1337
|
+
// Coordinate with streaming mode to prevent output corruption
|
|
1338
|
+
// During AI streaming, queue this output instead of writing immediately
|
|
1339
|
+
if (isStreamingMode()) {
|
|
1340
|
+
// Queue message with timestamp for debugging and proper FIFO ordering
|
|
1341
|
+
this.pendingMessages.push({
|
|
1342
|
+
content: payload,
|
|
1343
|
+
timestamp: Date.now()
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
else {
|
|
1347
|
+
// Flush any pending messages first (in order) before writing new content
|
|
1348
|
+
this.flushPendingMessages();
|
|
1349
|
+
display.stream(payload);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* Flush all pending messages in FIFO order with error handling
|
|
1354
|
+
* Called when exiting streaming mode to ensure no messages are lost
|
|
1355
|
+
*/
|
|
1356
|
+
flushPendingMessages() {
|
|
1357
|
+
// Process messages in FIFO order
|
|
1358
|
+
while (this.pendingMessages.length > 0) {
|
|
1359
|
+
const msg = this.pendingMessages.shift();
|
|
1360
|
+
if (msg) {
|
|
1361
|
+
try {
|
|
1362
|
+
display.stream(msg.content);
|
|
1363
|
+
}
|
|
1364
|
+
catch (error) {
|
|
1365
|
+
// Fallback to direct stdout write if display fails
|
|
1366
|
+
console.error('Failed to flush message:', error);
|
|
1367
|
+
try {
|
|
1368
|
+
process.stdout.write(msg.content);
|
|
1369
|
+
}
|
|
1370
|
+
catch (fallbackError) {
|
|
1371
|
+
console.error('Critical: Unable to write message:', fallbackError);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1340
1375
|
}
|
|
1341
|
-
writeLock.withLock(() => {
|
|
1342
|
-
process.stdout.write(content);
|
|
1343
|
-
}, 'interactiveShell.stdout');
|
|
1344
1376
|
}
|
|
1345
1377
|
beginAiRuntime() {
|
|
1346
1378
|
if (this.aiRuntimeStart === null) {
|
|
@@ -1493,6 +1525,9 @@ export class InteractiveShell {
|
|
|
1493
1525
|
const quiet = options.quiet === true;
|
|
1494
1526
|
// Exit global streaming mode - allows UI to render again
|
|
1495
1527
|
exitStreamingMode();
|
|
1528
|
+
// CRITICAL: Flush all pending messages before continuing
|
|
1529
|
+
// This ensures messages queued during streaming are displayed in order
|
|
1530
|
+
this.flushPendingMessages();
|
|
1496
1531
|
// Preserve final elapsed time before clearing heartbeat start
|
|
1497
1532
|
if (this.streamingHeartbeatStart) {
|
|
1498
1533
|
this.lastStreamingElapsedSeconds = Math.max(0, Math.floor((Date.now() - this.streamingHeartbeatStart) / 1000));
|
|
@@ -2051,7 +2086,7 @@ export class InteractiveShell {
|
|
|
2051
2086
|
lines.push('');
|
|
2052
2087
|
lines.push(theme.bold('Tool suites'));
|
|
2053
2088
|
const toolSettings = loadToolSettings();
|
|
2054
|
-
const selection = buildEnabledToolSet(toolSettings);
|
|
2089
|
+
const selection = buildEnabledToolSet(toolSettings, this.profile);
|
|
2055
2090
|
const permissions = evaluateToolPermissions(selection);
|
|
2056
2091
|
const options = getToolToggleOptions();
|
|
2057
2092
|
const enabledLabels = options
|
|
@@ -4048,7 +4083,7 @@ export class InteractiveShell {
|
|
|
4048
4083
|
}
|
|
4049
4084
|
getToolSelectionSummary() {
|
|
4050
4085
|
const toolSettings = loadToolSettings();
|
|
4051
|
-
const selection = buildEnabledToolSet(toolSettings);
|
|
4086
|
+
const selection = buildEnabledToolSet(toolSettings, this.profile);
|
|
4052
4087
|
const options = getToolToggleOptions();
|
|
4053
4088
|
if (!options.length) {
|
|
4054
4089
|
return null;
|
|
@@ -4275,7 +4310,7 @@ export class InteractiveShell {
|
|
|
4275
4310
|
display.showWarning('No configurable tools are available.');
|
|
4276
4311
|
return;
|
|
4277
4312
|
}
|
|
4278
|
-
const selection = buildEnabledToolSet(loadToolSettings());
|
|
4313
|
+
const selection = buildEnabledToolSet(loadToolSettings(), this.profile);
|
|
4279
4314
|
const interaction = {
|
|
4280
4315
|
type: 'tool-settings',
|
|
4281
4316
|
options,
|