erosolar-cli 2.1.195 → 2.1.196
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 +14 -0
- package/dist/contracts/agent-schemas.json +0 -21
- package/dist/contracts/tools.schema.json +0 -16
- package/dist/core/agentOrchestrator.d.ts +14 -18
- package/dist/core/agentOrchestrator.d.ts.map +1 -1
- package/dist/core/agentOrchestrator.js +120 -175
- package/dist/core/agentOrchestrator.js.map +1 -1
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
- package/dist/plugins/tools/nodeDefaults.js +0 -4
- package/dist/plugins/tools/nodeDefaults.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +0 -8
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +53 -285
- package/dist/shell/interactiveShell.js.map +1 -1
- package/package.json +1 -1
- package/agents/erosolar-security.rules.json +0 -147
- package/dist/capabilities/offsecOpsCapability.d.ts +0 -6
- package/dist/capabilities/offsecOpsCapability.d.ts.map +0 -1
- package/dist/capabilities/offsecOpsCapability.js +0 -19
- package/dist/capabilities/offsecOpsCapability.js.map +0 -1
- package/dist/capabilities/offsecSearchCapability.d.ts +0 -12
- package/dist/capabilities/offsecSearchCapability.d.ts.map +0 -1
- package/dist/capabilities/offsecSearchCapability.js +0 -27
- package/dist/capabilities/offsecSearchCapability.js.map +0 -1
- package/dist/core/offsecAlphaZero.d.ts +0 -59
- package/dist/core/offsecAlphaZero.d.ts.map +0 -1
- package/dist/core/offsecAlphaZero.js +0 -556
- package/dist/core/offsecAlphaZero.js.map +0 -1
- package/dist/plugins/tools/offsec/offsecOpsPlugin.d.ts +0 -3
- package/dist/plugins/tools/offsec/offsecOpsPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/offsec/offsecOpsPlugin.js +0 -10
- package/dist/plugins/tools/offsec/offsecOpsPlugin.js.map +0 -1
- package/dist/plugins/tools/offsec/offsecSearchPlugin.d.ts +0 -3
- package/dist/plugins/tools/offsec/offsecSearchPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/offsec/offsecSearchPlugin.js +0 -12
- package/dist/plugins/tools/offsec/offsecSearchPlugin.js.map +0 -1
- package/dist/tools/offsec/offsecOperationsTools.d.ts +0 -3
- package/dist/tools/offsec/offsecOperationsTools.d.ts.map +0 -1
- package/dist/tools/offsec/offsecOperationsTools.js +0 -333
- package/dist/tools/offsec/offsecOperationsTools.js.map +0 -1
- package/dist/tools/offsecSearchTools.d.ts +0 -3
- package/dist/tools/offsecSearchTools.d.ts.map +0 -1
- package/dist/tools/offsecSearchTools.js +0 -330
- package/dist/tools/offsecSearchTools.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Erosolar Planning
|
|
2
|
+
|
|
3
|
+
This workspace hosts development and integration tests for the Erosolar CLI agent. It mirrors the main CLI codebase but is used for local planning, orchestration hardening, and reliability fixes.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
- Install dependencies: `npm install`
|
|
7
|
+
- Build: `npm run build`
|
|
8
|
+
- Run tests: `npm test`
|
|
9
|
+
- Lint: `npm run lint`
|
|
10
|
+
|
|
11
|
+
## Running the CLI
|
|
12
|
+
- After building, start the interactive shell with `npm run start` or `erosolar`.
|
|
13
|
+
- Use `erosolar --eval "prompt"` for non-interactive text mode.
|
|
14
|
+
- Use `erosolar --json --provider <p> --model <m> --prompt "..."` for headless JSON output.
|
|
@@ -285,27 +285,6 @@
|
|
|
285
285
|
"primaryUseCase": "coding",
|
|
286
286
|
"tags": ["coding", "deterministic", "rapid-edits"]
|
|
287
287
|
}
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"name": "erosolar-security",
|
|
291
|
-
"label": "Erosolar Security",
|
|
292
|
-
"description": "Security-focused operator for adversarial planning and assessments in controlled environments.",
|
|
293
|
-
"defaultProvider": "openai",
|
|
294
|
-
"defaultModel": "gpt-5.1",
|
|
295
|
-
"temperature": 0.1,
|
|
296
|
-
"systemPrompt": {
|
|
297
|
-
"type": "rulebook"
|
|
298
|
-
},
|
|
299
|
-
"rulebook": {
|
|
300
|
-
"file": "agents/erosolar-security.rules.json",
|
|
301
|
-
"version": "2024-11-24",
|
|
302
|
-
"contractVersion": "1.0.0",
|
|
303
|
-
"description": "Security-focused guardrails and operational constraints."
|
|
304
|
-
},
|
|
305
|
-
"metadata": {
|
|
306
|
-
"primaryUseCase": "security",
|
|
307
|
-
"tags": ["security", "offsec", "assessment"]
|
|
308
|
-
}
|
|
309
288
|
}
|
|
310
289
|
],
|
|
311
290
|
|
|
@@ -29,22 +29,6 @@
|
|
|
29
29
|
"restartRequired": true
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
{
|
|
33
|
-
"id": "offensive-security",
|
|
34
|
-
"label": "Offensive Security Tools",
|
|
35
|
-
"description": "Comprehensive penetration testing and security assessment tools (network recon, web testing, exploitation, password cracking, payload generation). No preconditions required.",
|
|
36
|
-
"defaultEnabled": true,
|
|
37
|
-
"category": "security",
|
|
38
|
-
"pluginIds": [
|
|
39
|
-
"tool.offsec.exploit-search",
|
|
40
|
-
"tool.offsec.operations",
|
|
41
|
-
"tool.tao"
|
|
42
|
-
],
|
|
43
|
-
"metadata": {
|
|
44
|
-
"locked": false,
|
|
45
|
-
"restartRequired": false
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
32
|
{
|
|
49
33
|
"id": "development-tools",
|
|
50
34
|
"label": "Software Development Tools",
|
|
@@ -1,49 +1,45 @@
|
|
|
1
1
|
import { AgentRuntime } from './agent.js';
|
|
2
2
|
import { type CompletionAnalysis } from './taskCompletionDetector.js';
|
|
3
|
-
export type OrchestratorExitReason = 'complete' | '
|
|
3
|
+
export type OrchestratorExitReason = 'complete' | 'verification-needed' | 'no-action' | 'empty-response' | 'blocked' | 'incomplete';
|
|
4
4
|
export interface OrchestratorOptions {
|
|
5
|
-
/** Maximum number of passes to attempt before giving up */
|
|
6
|
-
maxPasses?: number;
|
|
7
5
|
/** Whether to stream provider responses */
|
|
8
6
|
streaming?: boolean;
|
|
9
7
|
/** Require observable action (tool usage or action language) before stopping */
|
|
10
8
|
enforceActions?: boolean;
|
|
11
|
-
/** Maximum number of consecutive low-progress passes before forcing a reset */
|
|
12
|
-
maxStagnantPasses?: number;
|
|
13
9
|
/** Whether to inject a verification check before declaring completion */
|
|
14
10
|
verificationMode?: 'auto' | 'disabled';
|
|
11
|
+
/** Append single-pass execution guidance to the user request */
|
|
12
|
+
singlePassFocus?: boolean;
|
|
15
13
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
14
|
+
export interface OrchestratorResult {
|
|
15
|
+
finalResponse: string;
|
|
18
16
|
toolsUsed: string[];
|
|
19
17
|
planOnly: boolean;
|
|
20
18
|
tookAction: boolean;
|
|
21
19
|
completion: CompletionAnalysis;
|
|
22
|
-
followUpPrompt?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface OrchestratorResult {
|
|
25
|
-
finalResponse: string;
|
|
26
|
-
passes: OrchestratorPass[];
|
|
27
20
|
exitReason: OrchestratorExitReason;
|
|
21
|
+
statusSummary: string;
|
|
22
|
+
limitations: string[];
|
|
23
|
+
recommendations: string[];
|
|
28
24
|
}
|
|
29
25
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
26
|
+
* Single-pass orchestration: drive the agent to finish as much as possible
|
|
27
|
+
* in one go, with strong bias toward real actions over planning.
|
|
32
28
|
*/
|
|
33
29
|
export declare class AgentOrchestrator {
|
|
34
30
|
private readonly agent;
|
|
35
31
|
constructor(agent: AgentRuntime);
|
|
36
32
|
runToCompletion(request: string, options?: OrchestratorOptions): Promise<OrchestratorResult>;
|
|
33
|
+
private resolveExitReason;
|
|
34
|
+
private buildStatusSummary;
|
|
35
|
+
private buildSinglePassPrompt;
|
|
37
36
|
private analyzeResponse;
|
|
38
37
|
private isPlanOnly;
|
|
39
38
|
private hasExplicitCompletion;
|
|
40
39
|
private hasCompletionContradiction;
|
|
41
40
|
private hasActionLanguage;
|
|
42
|
-
private isLoopWarning;
|
|
43
|
-
private wordCount;
|
|
44
|
-
private buildFollowUp;
|
|
45
|
-
private buildVerificationPrompt;
|
|
46
41
|
private hasContinuingSignal;
|
|
47
42
|
private isBlockedResponse;
|
|
43
|
+
private wordCount;
|
|
48
44
|
}
|
|
49
45
|
//# sourceMappingURL=agentOrchestrator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentOrchestrator.d.ts","sourceRoot":"","sources":["../../src/core/agentOrchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA4B,MAAM,YAAY,CAAC;AACpE,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAE9F,MAAM,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"agentOrchestrator.d.ts","sourceRoot":"","sources":["../../src/core/agentOrchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA4B,MAAM,YAAY,CAAC;AACpE,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAE9F,MAAM,MAAM,sBAAsB,GAC9B,UAAU,GACV,qBAAqB,GACrB,WAAW,GACX,gBAAgB,GAChB,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gFAAgF;IAChF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACvC,gEAAgE;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,UAAU,EAAE,sBAAsB,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAEzB,KAAK,EAAE,YAAY;IAIzB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAqClG,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,kBAAkB;IA+E1B,OAAO,CAAC,qBAAqB;IAc7B,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,UAAU;IAsBlB,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,0BAA0B;IAelC,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,SAAS;CAIlB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TaskCompletionDetector } from './taskCompletionDetector.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Single-pass orchestration: drive the agent to finish as much as possible
|
|
4
|
+
* in one go, with strong bias toward real actions over planning.
|
|
5
5
|
*/
|
|
6
6
|
export class AgentOrchestrator {
|
|
7
7
|
agent;
|
|
@@ -9,96 +9,126 @@ export class AgentOrchestrator {
|
|
|
9
9
|
this.agent = agent;
|
|
10
10
|
}
|
|
11
11
|
async runToCompletion(request, options) {
|
|
12
|
-
const maxPasses = options?.maxPasses ?? 8;
|
|
13
12
|
const streaming = options?.streaming ?? true;
|
|
14
13
|
const enforceActions = options?.enforceActions ?? true;
|
|
15
|
-
const maxStagnantPasses = options?.maxStagnantPasses ?? 3;
|
|
16
14
|
const verificationMode = options?.verificationMode ?? 'auto';
|
|
17
|
-
const
|
|
15
|
+
const singlePassFocus = options?.singlePassFocus ?? true;
|
|
18
16
|
const completionDetector = new TaskCompletionDetector();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
const prompt = singlePassFocus ? this.buildSinglePassPrompt(request, enforceActions) : request.trim();
|
|
18
|
+
const response = (await this.agent.send(prompt, streaming)).trim();
|
|
19
|
+
const toolExecutions = this.agent.drainToolExecutions();
|
|
20
|
+
toolExecutions.forEach(exec => completionDetector.recordToolCall(exec.name, exec.success, exec.hasOutput));
|
|
21
|
+
const toolsUsed = toolExecutions.filter(exec => exec.success).map(exec => exec.name);
|
|
22
|
+
const completion = completionDetector.analyzeCompletion(response, toolsUsed);
|
|
23
|
+
const analysis = this.analyzeResponse(response, toolsUsed, enforceActions);
|
|
24
|
+
const exitReason = this.resolveExitReason(analysis, completion, enforceActions, verificationMode);
|
|
25
|
+
const { summary, limitations, recommendations } = this.buildStatusSummary(request, response, analysis, completion, toolsUsed, exitReason);
|
|
26
|
+
return {
|
|
27
|
+
finalResponse: response,
|
|
28
|
+
toolsUsed,
|
|
29
|
+
planOnly: analysis.planOnly,
|
|
30
|
+
tookAction: analysis.tookAction,
|
|
31
|
+
completion,
|
|
32
|
+
exitReason,
|
|
33
|
+
statusSummary: summary,
|
|
34
|
+
limitations,
|
|
35
|
+
recommendations,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
resolveExitReason(analysis, completion, enforceActions, verificationMode) {
|
|
39
|
+
if (analysis.empty) {
|
|
40
|
+
return 'empty-response';
|
|
41
|
+
}
|
|
42
|
+
if (analysis.blocked) {
|
|
43
|
+
return 'blocked';
|
|
44
|
+
}
|
|
45
|
+
if (enforceActions && !analysis.tookAction) {
|
|
46
|
+
return 'no-action';
|
|
47
|
+
}
|
|
48
|
+
if (verificationMode === 'auto' && completion.shouldVerify) {
|
|
49
|
+
return 'verification-needed';
|
|
50
|
+
}
|
|
51
|
+
if (analysis.readyToStop || completion.isComplete) {
|
|
52
|
+
return 'complete';
|
|
53
|
+
}
|
|
54
|
+
return 'incomplete';
|
|
55
|
+
}
|
|
56
|
+
buildStatusSummary(request, response, analysis, completion, toolsUsed, exitReason) {
|
|
57
|
+
const limitations = [
|
|
58
|
+
'Single-pass orchestration: no follow-up rounds were executed.',
|
|
59
|
+
'Evidence is limited to the tools invoked during this pass.',
|
|
60
|
+
];
|
|
61
|
+
if (analysis.planOnly) {
|
|
62
|
+
limitations.push('The response was plan-only; no concrete tool actions were observed.');
|
|
63
|
+
}
|
|
64
|
+
if (toolsUsed.length === 0) {
|
|
65
|
+
limitations.push('No tools executed, so no command output or file evidence is available.');
|
|
66
|
+
}
|
|
67
|
+
if (completion.shouldVerify) {
|
|
68
|
+
limitations.push('Verification recommended by completion detector; a secondary check was not performed.');
|
|
69
|
+
}
|
|
70
|
+
const recommendations = ['Consider running focused checks/tests to validate the outcome.'];
|
|
71
|
+
if (completion.shouldVerify) {
|
|
72
|
+
recommendations.push('Run targeted verification steps or tests to validate the claims.');
|
|
73
|
+
}
|
|
74
|
+
switch (exitReason) {
|
|
75
|
+
case 'no-action':
|
|
76
|
+
recommendations.push('Execute concrete actions (read/search/edit/test) and capture outputs.');
|
|
43
77
|
break;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
exitReason = 'empty-response';
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
consecutiveLowProgress++;
|
|
59
|
-
const followUp = this.buildFollowUp(request, response, toolsUsed, 'empty', consecutiveLowProgress);
|
|
60
|
-
passRecord.followUpPrompt = followUp;
|
|
61
|
-
prompt = followUp;
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
const lowProgress = !tookAction || analysis.planOnly || loopDetected;
|
|
65
|
-
consecutiveLowProgress = lowProgress ? consecutiveLowProgress + 1 : 0;
|
|
66
|
-
if (consecutiveLowProgress >= maxStagnantPasses) {
|
|
67
|
-
if (pass === maxPasses - 1) {
|
|
68
|
-
exitReason = 'stalled';
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
const followUp = this.buildFollowUp(request, response, toolsUsed, 'stalled', consecutiveLowProgress);
|
|
72
|
-
passRecord.followUpPrompt = followUp;
|
|
73
|
-
prompt = followUp;
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (pass === maxPasses - 1) {
|
|
77
|
-
exitReason = 'max-passes';
|
|
78
|
+
case 'blocked':
|
|
79
|
+
recommendations.push('Unblock missing credentials/permissions and retry with tool actions.');
|
|
80
|
+
break;
|
|
81
|
+
case 'incomplete':
|
|
82
|
+
recommendations.push('Continue work with tool usage to gather evidence and close gaps.');
|
|
83
|
+
break;
|
|
84
|
+
case 'empty-response':
|
|
85
|
+
recommendations.push('Re-run with a concrete action or ask a focused follow-up question.');
|
|
86
|
+
break;
|
|
87
|
+
case 'complete':
|
|
88
|
+
default:
|
|
78
89
|
break;
|
|
79
|
-
}
|
|
80
|
-
const followUp = this.buildFollowUp(request, response, toolsUsed, loopDetected ? 'stalled' : analysis.reason, consecutiveLowProgress);
|
|
81
|
-
passRecord.followUpPrompt = followUp;
|
|
82
|
-
prompt = followUp;
|
|
83
90
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
const evidenceLine = toolsUsed.length
|
|
92
|
+
? `Tools used: ${toolsUsed.join(', ')}.`
|
|
93
|
+
: 'No tools used.';
|
|
94
|
+
const reasonLine = (() => {
|
|
95
|
+
switch (exitReason) {
|
|
96
|
+
case 'complete':
|
|
97
|
+
return completion.shouldVerify
|
|
98
|
+
? 'Model claims completion but suggested verification.'
|
|
99
|
+
: 'Model signaled completion.';
|
|
100
|
+
case 'verification-needed':
|
|
101
|
+
return 'Model requested verification before declaring completion.';
|
|
102
|
+
case 'no-action':
|
|
103
|
+
return 'No concrete actions detected; likely plan-only.';
|
|
104
|
+
case 'empty-response':
|
|
105
|
+
return 'Received an empty response.';
|
|
106
|
+
case 'blocked':
|
|
107
|
+
return 'Model indicated it is blocked or missing prerequisites.';
|
|
108
|
+
case 'incomplete':
|
|
109
|
+
default:
|
|
110
|
+
return 'Single-pass did not reach a confident completion signal.';
|
|
95
111
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
})();
|
|
113
|
+
const summary = [
|
|
114
|
+
`Request: ${request.trim()}`,
|
|
115
|
+
`Exit: ${exitReason}`,
|
|
116
|
+
reasonLine,
|
|
117
|
+
evidenceLine,
|
|
118
|
+
].join(' | ');
|
|
119
|
+
return { summary, limitations, recommendations };
|
|
120
|
+
}
|
|
121
|
+
buildSinglePassPrompt(originalRequest, enforceActions) {
|
|
122
|
+
const actionLine = enforceActions
|
|
123
|
+
? '- Take concrete actions with available tools (list_files/glob/search/read/bash/edit/git); do not stop at planning.'
|
|
124
|
+
: '- Provide the strongest single response you can.';
|
|
125
|
+
return `${originalRequest.trim()}
|
|
126
|
+
|
|
127
|
+
Single-pass orchestration:
|
|
128
|
+
${actionLine}
|
|
129
|
+
- Do not defer work or ask to continue; finish as much as possible now.
|
|
130
|
+
- Show command outputs and file changes as evidence.
|
|
131
|
+
- Reply with TASK_FULLY_COMPLETE only when everything is actually done.`;
|
|
102
132
|
}
|
|
103
133
|
analyzeResponse(response, toolsUsed, enforceActions) {
|
|
104
134
|
const trimmed = response.trim();
|
|
@@ -110,39 +140,16 @@ export class AgentOrchestrator {
|
|
|
110
140
|
const continuing = this.hasContinuingSignal(trimmed);
|
|
111
141
|
const blocked = this.isBlockedResponse(trimmed);
|
|
112
142
|
const tooLight = this.wordCount(trimmed) < 80;
|
|
113
|
-
const lacksEvidence = !tookAction && tooLight;
|
|
114
|
-
const needsMoreWork = empty ||
|
|
115
|
-
blocked ||
|
|
116
|
-
completionContradiction ||
|
|
117
|
-
continuing ||
|
|
118
|
-
planOnly ||
|
|
119
|
-
(enforceActions && (lacksEvidence || (!hasCompletionMarker && !tookAction)));
|
|
120
143
|
const readyToStop = hasCompletionMarker &&
|
|
121
144
|
!completionContradiction &&
|
|
122
145
|
!continuing &&
|
|
123
146
|
(!enforceActions || tookAction || !tooLight);
|
|
124
|
-
const reason = (() => {
|
|
125
|
-
if (blocked)
|
|
126
|
-
return 'blocked';
|
|
127
|
-
if (completionContradiction)
|
|
128
|
-
return 'contradiction';
|
|
129
|
-
if (continuing)
|
|
130
|
-
return 'continuing';
|
|
131
|
-
if (planOnly)
|
|
132
|
-
return 'plan-only';
|
|
133
|
-
if (empty)
|
|
134
|
-
return 'empty';
|
|
135
|
-
if (lacksEvidence)
|
|
136
|
-
return 'no-action';
|
|
137
|
-
return 'keep-going';
|
|
138
|
-
})();
|
|
139
147
|
return {
|
|
140
148
|
empty,
|
|
141
149
|
planOnly,
|
|
142
150
|
tookAction,
|
|
143
|
-
needsMoreWork,
|
|
144
151
|
readyToStop,
|
|
145
|
-
|
|
152
|
+
blocked,
|
|
146
153
|
};
|
|
147
154
|
}
|
|
148
155
|
isPlanOnly(response) {
|
|
@@ -218,73 +225,6 @@ export class AgentOrchestrator {
|
|
|
218
225
|
];
|
|
219
226
|
return actionPatterns.some((pattern) => pattern.test(response));
|
|
220
227
|
}
|
|
221
|
-
isLoopWarning(response) {
|
|
222
|
-
if (!response.trim())
|
|
223
|
-
return false;
|
|
224
|
-
const lower = response.toLowerCase();
|
|
225
|
-
return lower.includes('behavioral loop detected') || lower.includes('tool loop detected');
|
|
226
|
-
}
|
|
227
|
-
wordCount(text) {
|
|
228
|
-
if (!text.trim())
|
|
229
|
-
return 0;
|
|
230
|
-
return text.trim().split(/\s+/).length;
|
|
231
|
-
}
|
|
232
|
-
buildFollowUp(originalRequest, lastResponse, toolsUsed, reason, nudgeLevel) {
|
|
233
|
-
const toolLine = toolsUsed.length
|
|
234
|
-
? `Tools already used: ${toolsUsed.join(', ')}. Keep using tools for the next actions.`
|
|
235
|
-
: 'No tools were used yet. Start with a quick workspace scan (list_files + glob/grep/search) and then run bash/edit/read/git tools to actually perform work.';
|
|
236
|
-
const focus = (() => {
|
|
237
|
-
switch (reason) {
|
|
238
|
-
case 'plan-only':
|
|
239
|
-
return 'Stop repeating the plan. Execute the steps you described.';
|
|
240
|
-
case 'no-action':
|
|
241
|
-
return 'You have not shown any concrete work yet. Take an immediate, visible action.';
|
|
242
|
-
case 'stalled':
|
|
243
|
-
return 'You appear stuck or repeating yourself. Switch tools or choose a different approach and make a concrete change.';
|
|
244
|
-
case 'empty':
|
|
245
|
-
return 'Your last reply was empty. Resume the task and perform actions now.';
|
|
246
|
-
case 'blocked':
|
|
247
|
-
return 'You indicated you are blocked. Ask for the exact info you need and proceed with everything you can do now.';
|
|
248
|
-
case 'contradiction':
|
|
249
|
-
return 'Your message mentions remaining work. Resolve the items before claiming completion.';
|
|
250
|
-
case 'continuing':
|
|
251
|
-
return 'You are still narrating future intent. Execute a specific action and show its result.';
|
|
252
|
-
case 'keep-going':
|
|
253
|
-
default:
|
|
254
|
-
return 'Continue executing until the request is fully completed.';
|
|
255
|
-
}
|
|
256
|
-
})();
|
|
257
|
-
const lastSnippet = lastResponse.trim()
|
|
258
|
-
? `Your last response:\n${lastResponse.trim().slice(0, 800)}`
|
|
259
|
-
: 'No previous response was returned.';
|
|
260
|
-
const urgency = nudgeLevel > 1
|
|
261
|
-
? 'Pick one concrete command (e.g., read a file, run tests, apply an edit) and show the output before summarizing.'
|
|
262
|
-
: 'Take the next concrete action and show the output before moving on.';
|
|
263
|
-
return `${originalRequest}
|
|
264
|
-
|
|
265
|
-
${focus}
|
|
266
|
-
${toolLine}
|
|
267
|
-
${lastSnippet}
|
|
268
|
-
|
|
269
|
-
- Use tools to inspect and modify the workspace as needed.
|
|
270
|
-
- Run a quick repo scan (list_files, glob/grep/search) to gather evidence across the codebase before deciding you are done.
|
|
271
|
-
- ${urgency}
|
|
272
|
-
- Report concrete changes and progress after each action; include command outputs and file updates.
|
|
273
|
-
- If you truly need information, ask one concise question and then keep working with what you can verify.
|
|
274
|
-
- Reply with TASK_FULLY_COMPLETE only when the entire request is actually finished (no TODOs or pending work).`;
|
|
275
|
-
}
|
|
276
|
-
buildVerificationPrompt(originalRequest, verificationPrompt, toolsUsed) {
|
|
277
|
-
const toolLine = toolsUsed.length
|
|
278
|
-
? `Recent tools: ${toolsUsed.join(', ')}.`
|
|
279
|
-
: 'No tools have been used yet; take concrete actions if anything remains.';
|
|
280
|
-
return `${verificationPrompt.trim()}
|
|
281
|
-
|
|
282
|
-
Original request: ${originalRequest.trim()}
|
|
283
|
-
|
|
284
|
-
${toolLine}
|
|
285
|
-
- If anything is still outstanding, continue executing work instead of repeating plans.
|
|
286
|
-
- Keep using tools to gather evidence and finish the task before claiming completion.`;
|
|
287
|
-
}
|
|
288
228
|
hasContinuingSignal(response) {
|
|
289
229
|
if (!response.trim())
|
|
290
230
|
return false;
|
|
@@ -309,5 +249,10 @@ ${toolLine}
|
|
|
309
249
|
];
|
|
310
250
|
return patterns.some((pattern) => pattern.test(response));
|
|
311
251
|
}
|
|
252
|
+
wordCount(text) {
|
|
253
|
+
if (!text.trim())
|
|
254
|
+
return 0;
|
|
255
|
+
return text.trim().split(/\s+/).length;
|
|
256
|
+
}
|
|
312
257
|
}
|
|
313
258
|
//# sourceMappingURL=agentOrchestrator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentOrchestrator.js","sourceRoot":"","sources":["../../src/core/agentOrchestrator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAA2B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"agentOrchestrator.js","sourceRoot":"","sources":["../../src/core/agentOrchestrator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAA2B,MAAM,6BAA6B,CAAC;AAiC9F;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACX,KAAK,CAAe;IAErC,YAAY,KAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,OAAe,EAAE,OAA6B;QAClE,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,IAAI,CAAC;QAC7C,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,IAAI,CAAC;QACvD,MAAM,gBAAgB,GAAG,OAAO,EAAE,gBAAgB,IAAI,MAAM,CAAC;QAC7D,MAAM,eAAe,GAAG,OAAO,EAAE,eAAe,IAAI,IAAI,CAAC;QACzD,MAAM,kBAAkB,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAExD,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACtG,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACnE,MAAM,cAAc,GAA0B,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC;QAC/E,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,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YAAE,OAAO,KAAK,CAAC;QACnC,MAAM,QAAQ,GAAG;YACf,4DAA4D;YAC5D,6DAA6D;YAC7D,6CAA6C;YAC7C,gBAAgB;YAChB,wBAAwB;SACzB,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,CAAC;IAEO,iBAAiB,CAAC,QAAgB;QACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YAAE,OAAO,KAAK,CAAC;QACnC,MAAM,QAAQ,GAAG;YACf,oEAAoE;YACpE,iEAAiE;YACjE,4BAA4B;YAC5B,cAAc;YACd,mDAAmD;SACpD,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,CAAC;IAEO,SAAS,CAAC,IAAY;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,OAAO,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/plugins/tools/nodeDefaults.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/plugins/tools/nodeDefaults.ts"],"names":[],"mappings":"AAmCA,wBAAgB,8BAA8B,IAAI,IAAI,CAsCrD"}
|
|
@@ -29,8 +29,6 @@ import { createValidationToolPlugin } from './validation/validationPlugin.js';
|
|
|
29
29
|
import { createEnhancedAnalysisToolPlugin } from './enhancedAnalysis/enhancedAnalysisPlugin.js';
|
|
30
30
|
import { createEnhancedCodeIntelligenceToolPlugin } from './enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.js';
|
|
31
31
|
import { createEnhancedDevWorkflowToolPlugin } from './enhancedDevWorkflow/enhancedDevWorkflowPlugin.js';
|
|
32
|
-
import { createOffsecSearchToolPlugin } from './offsec/offsecSearchPlugin.js';
|
|
33
|
-
import { createOffsecOperationsToolPlugin } from './offsec/offsecOpsPlugin.js';
|
|
34
32
|
import { createTAOToolPlugin } from './tao/taoPlugin.js';
|
|
35
33
|
let registered = false;
|
|
36
34
|
export function registerDefaultNodeToolPlugins() {
|
|
@@ -67,8 +65,6 @@ export function registerDefaultNodeToolPlugins() {
|
|
|
67
65
|
registerToolPlugin(createEnhancedAnalysisToolPlugin());
|
|
68
66
|
registerToolPlugin(createEnhancedCodeIntelligenceToolPlugin());
|
|
69
67
|
registerToolPlugin(createEnhancedDevWorkflowToolPlugin());
|
|
70
|
-
registerToolPlugin(createOffsecSearchToolPlugin());
|
|
71
|
-
registerToolPlugin(createOffsecOperationsToolPlugin());
|
|
72
68
|
registerToolPlugin(createTAOToolPlugin());
|
|
73
69
|
registered = true;
|
|
74
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeDefaults.js","sourceRoot":"","sources":["../../../src/plugins/tools/nodeDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OA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AA2B,EAAE,CAAC,CAAC;IAClD,kBAAkB,CAAC,0BAA0B,EAAE,CAAC,CAAC;IACjD,kBAAkB,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAC9C,kBAAkB,CAAC,8BAA8B,EAAE,CAAC,CAAC;IACrD,kBAAkB,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC/C,kBAAkB,CAAC,2BAA2B,EAAE,CAAC,CAAC;IAClD,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC1C,kBAAkB,CAAC,6BAA6B,EAAE,CAAC,CAAC;IACpD,kBAAkB,CAAC,2BAA2B,EAAE,CAAC,CAAC;IAClD,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC5C,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC1C,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC5C,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC5C,kBAAkB,CAAC,+BAA+B,EAAE,CAAC,CAAC;IACtD,kBAAkB,CAAC,iCAAiC,EAAE,CAAC,CAAC;IACxD,kBAAkB,CAAC,0BAA0B,EAAE,CAAC,CAAC;IACjD,kBAAkB,CAAC,gCAAgC,EAAE,CAAC,CAAC;IACvD,kBAAkB,CAAC,wCAAwC,EAAE,CAAC,CAAC;IAC/D,kBAAkB,CAAC,mCAAmC,EAAE,CAAC,CAAC;IAC1D,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAE1C,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC"}
|
|
@@ -109,7 +109,6 @@ export declare class InteractiveShell {
|
|
|
109
109
|
private autoBuildPromise;
|
|
110
110
|
private lastAutoBuildRun;
|
|
111
111
|
private lastBuildSucceededAt;
|
|
112
|
-
private offsecRunId;
|
|
113
112
|
private streamingHeartbeatStart;
|
|
114
113
|
private streamingStatusLabel;
|
|
115
114
|
private lastStreamingElapsedSeconds;
|
|
@@ -381,9 +380,6 @@ export declare class InteractiveShell {
|
|
|
381
380
|
* Filters out obvious questions and informational prompts to avoid over-triggering.
|
|
382
381
|
*/
|
|
383
382
|
private shouldAutoRunToCompletion;
|
|
384
|
-
private shouldContinueOrchestrating;
|
|
385
|
-
private describeContinuationReason;
|
|
386
|
-
private buildForcedContinuationPrompt;
|
|
387
383
|
/**
|
|
388
384
|
* Decide whether to automatically continue execution when the model stops after a plan/summary
|
|
389
385
|
* without taking actions. This keeps flows moving toward completion instead of stalling on planning.
|
|
@@ -430,10 +426,6 @@ export declare class InteractiveShell {
|
|
|
430
426
|
* Handle /modular command - redirects to /evolve (merged functionality)
|
|
431
427
|
*/
|
|
432
428
|
private handleModularCommand;
|
|
433
|
-
/**
|
|
434
|
-
* Handle /offsec command - AlphaZero offensive security run helper
|
|
435
|
-
*/
|
|
436
|
-
private handleOffsecCommand;
|
|
437
429
|
/**
|
|
438
430
|
* Handle /test command for intelligent test flows
|
|
439
431
|
*/
|