erosolar-cli 2.1.193 → 2.1.194

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 (75) hide show
  1. package/README.md +54 -0
  2. package/dist/capabilities/offsecOpsCapability.d.ts +2 -2
  3. package/dist/capabilities/offsecOpsCapability.d.ts.map +1 -1
  4. package/dist/capabilities/offsecOpsCapability.js +6 -7
  5. package/dist/capabilities/offsecOpsCapability.js.map +1 -1
  6. package/dist/contracts/models.schema.json +9 -0
  7. package/dist/core/agent.d.ts +31 -12
  8. package/dist/core/agent.d.ts.map +1 -1
  9. package/dist/core/agent.js +71 -84
  10. package/dist/core/agent.js.map +1 -1
  11. package/dist/core/agentOrchestrator.d.ts +49 -0
  12. package/dist/core/agentOrchestrator.d.ts.map +1 -0
  13. package/dist/core/agentOrchestrator.js +313 -0
  14. package/dist/core/agentOrchestrator.js.map +1 -0
  15. package/dist/core/alphaZeroOrchestrator.d.ts +140 -0
  16. package/dist/core/alphaZeroOrchestrator.d.ts.map +1 -0
  17. package/dist/core/alphaZeroOrchestrator.js +418 -0
  18. package/dist/core/alphaZeroOrchestrator.js.map +1 -0
  19. package/dist/core/schemaValidator.d.ts +5 -0
  20. package/dist/core/schemaValidator.d.ts.map +1 -1
  21. package/dist/core/schemaValidator.js +65 -0
  22. package/dist/core/schemaValidator.js.map +1 -1
  23. package/dist/core/taskCompletionDetector.d.ts +106 -0
  24. package/dist/core/taskCompletionDetector.d.ts.map +1 -0
  25. package/dist/core/taskCompletionDetector.js +402 -0
  26. package/dist/core/taskCompletionDetector.js.map +1 -0
  27. package/dist/core/toolRuntime.d.ts +4 -0
  28. package/dist/core/toolRuntime.d.ts.map +1 -1
  29. package/dist/core/toolRuntime.js +40 -64
  30. package/dist/core/toolRuntime.js.map +1 -1
  31. package/dist/core/types.d.ts +14 -0
  32. package/dist/core/types.d.ts.map +1 -1
  33. package/dist/core/types.js.map +1 -1
  34. package/dist/providers/anthropicProvider.d.ts +8 -1
  35. package/dist/providers/anthropicProvider.d.ts.map +1 -1
  36. package/dist/providers/anthropicProvider.js +51 -0
  37. package/dist/providers/anthropicProvider.js.map +1 -1
  38. package/dist/providers/googleProvider.d.ts +7 -1
  39. package/dist/providers/googleProvider.d.ts.map +1 -1
  40. package/dist/providers/googleProvider.js +41 -0
  41. package/dist/providers/googleProvider.js.map +1 -1
  42. package/dist/providers/openaiChatCompletionsProvider.d.ts +7 -1
  43. package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -1
  44. package/dist/providers/openaiChatCompletionsProvider.js +44 -0
  45. package/dist/providers/openaiChatCompletionsProvider.js.map +1 -1
  46. package/dist/shell/interactiveShell.d.ts +24 -4
  47. package/dist/shell/interactiveShell.d.ts.map +1 -1
  48. package/dist/shell/interactiveShell.js +437 -191
  49. package/dist/shell/interactiveShell.js.map +1 -1
  50. package/dist/shell/shellApp.js +8 -1
  51. package/dist/shell/shellApp.js.map +1 -1
  52. package/dist/tools/bashTools.d.ts +0 -1
  53. package/dist/tools/bashTools.d.ts.map +1 -1
  54. package/dist/tools/bashTools.js +3 -47
  55. package/dist/tools/bashTools.js.map +1 -1
  56. package/dist/tools/buildTools.js +1 -1
  57. package/dist/tools/buildTools.js.map +1 -1
  58. package/dist/tools/grepTools.js +6 -4
  59. package/dist/tools/grepTools.js.map +1 -1
  60. package/dist/tools/repoChecksTools.d.ts.map +1 -1
  61. package/dist/tools/repoChecksTools.js +5 -7
  62. package/dist/tools/repoChecksTools.js.map +1 -1
  63. package/dist/ui/ShellUIAdapter.d.ts +3 -2
  64. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  65. package/dist/ui/ShellUIAdapter.js +9 -7
  66. package/dist/ui/ShellUIAdapter.js.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/runtime/flowOrchestrator.d.ts +0 -46
  69. package/dist/runtime/flowOrchestrator.d.ts.map +0 -1
  70. package/dist/runtime/flowOrchestrator.js +0 -80
  71. package/dist/runtime/flowOrchestrator.js.map +0 -1
  72. package/dist/shell/taskCompletionDetector.d.ts +0 -52
  73. package/dist/shell/taskCompletionDetector.d.ts.map +0 -1
  74. package/dist/shell/taskCompletionDetector.js +0 -131
  75. package/dist/shell/taskCompletionDetector.js.map +0 -1
@@ -0,0 +1,49 @@
1
+ import { AgentRuntime } from './agent.js';
2
+ import { type CompletionAnalysis } from './taskCompletionDetector.js';
3
+ export type OrchestratorExitReason = 'complete' | 'max-passes' | 'empty-response' | 'stalled';
4
+ export interface OrchestratorOptions {
5
+ /** Maximum number of passes to attempt before giving up */
6
+ maxPasses?: number;
7
+ /** Whether to stream provider responses */
8
+ streaming?: boolean;
9
+ /** Require observable action (tool usage or action language) before stopping */
10
+ enforceActions?: boolean;
11
+ /** Maximum number of consecutive low-progress passes before forcing a reset */
12
+ maxStagnantPasses?: number;
13
+ /** Whether to inject a verification check before declaring completion */
14
+ verificationMode?: 'auto' | 'disabled';
15
+ }
16
+ export interface OrchestratorPass {
17
+ response: string;
18
+ toolsUsed: string[];
19
+ planOnly: boolean;
20
+ tookAction: boolean;
21
+ completion: CompletionAnalysis;
22
+ followUpPrompt?: string;
23
+ }
24
+ export interface OrchestratorResult {
25
+ finalResponse: string;
26
+ passes: OrchestratorPass[];
27
+ exitReason: OrchestratorExitReason;
28
+ }
29
+ /**
30
+ * Drives an AgentRuntime through multiple passes until the request is actually completed.
31
+ * Helps avoid early stops after plan-only replies by forcing follow-up prompts that demand action.
32
+ */
33
+ export declare class AgentOrchestrator {
34
+ private readonly agent;
35
+ constructor(agent: AgentRuntime);
36
+ runToCompletion(request: string, options?: OrchestratorOptions): Promise<OrchestratorResult>;
37
+ private analyzeResponse;
38
+ private isPlanOnly;
39
+ private hasExplicitCompletion;
40
+ private hasCompletionContradiction;
41
+ private hasActionLanguage;
42
+ private isLoopWarning;
43
+ private wordCount;
44
+ private buildFollowUp;
45
+ private buildVerificationPrompt;
46
+ private hasContinuingSignal;
47
+ private isBlockedResponse;
48
+ }
49
+ //# sourceMapping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,OAAO,CAAC,UAAU;IAsBlB,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,0BAA0B;IAelC,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,aAAa;IAuDrB,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,iBAAiB;CAW1B"}
@@ -0,0 +1,313 @@
1
+ import { TaskCompletionDetector } from './taskCompletionDetector.js';
2
+ /**
3
+ * Drives an AgentRuntime through multiple passes until the request is actually completed.
4
+ * Helps avoid early stops after plan-only replies by forcing follow-up prompts that demand action.
5
+ */
6
+ export class AgentOrchestrator {
7
+ agent;
8
+ constructor(agent) {
9
+ this.agent = agent;
10
+ }
11
+ async runToCompletion(request, options) {
12
+ const maxPasses = options?.maxPasses ?? 8;
13
+ const streaming = options?.streaming ?? true;
14
+ const enforceActions = options?.enforceActions ?? true;
15
+ const maxStagnantPasses = options?.maxStagnantPasses ?? 3;
16
+ const verificationMode = options?.verificationMode ?? 'auto';
17
+ const passes = [];
18
+ const completionDetector = new TaskCompletionDetector();
19
+ let prompt = request.trim();
20
+ let exitReason = null;
21
+ let consecutiveLowProgress = 0;
22
+ let awaitingVerification = false;
23
+ for (let pass = 0; pass < maxPasses; pass++) {
24
+ const response = (await this.agent.send(prompt, streaming)).trim();
25
+ const toolExecutions = this.agent.drainToolExecutions();
26
+ toolExecutions.forEach(exec => completionDetector.recordToolCall(exec.name, exec.success, exec.hasOutput));
27
+ const toolsUsed = toolExecutions.filter(exec => exec.success).map(exec => exec.name);
28
+ const completion = completionDetector.analyzeCompletion(response, toolsUsed);
29
+ const analysis = this.analyzeResponse(response, toolsUsed, enforceActions);
30
+ const planOnly = analysis.planOnly;
31
+ const tookAction = analysis.tookAction;
32
+ const passRecord = { response, toolsUsed, planOnly, tookAction, completion };
33
+ passes.push(passRecord);
34
+ if (awaitingVerification) {
35
+ if (completionDetector.isVerificationConfirmed(response)) {
36
+ exitReason = 'complete';
37
+ break;
38
+ }
39
+ awaitingVerification = false;
40
+ }
41
+ if (completion.isComplete || analysis.readyToStop) {
42
+ exitReason = 'complete';
43
+ break;
44
+ }
45
+ const loopDetected = this.isLoopWarning(response);
46
+ if (completion.shouldVerify && completion.verificationPrompt && verificationMode === 'auto') {
47
+ awaitingVerification = true;
48
+ const followUp = this.buildVerificationPrompt(request, completion.verificationPrompt, toolsUsed);
49
+ passRecord.followUpPrompt = followUp;
50
+ prompt = followUp;
51
+ continue;
52
+ }
53
+ if (analysis.empty) {
54
+ if (pass === maxPasses - 1) {
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
+ break;
79
+ }
80
+ const followUp = this.buildFollowUp(request, response, toolsUsed, loopDetected ? 'stalled' : analysis.reason, consecutiveLowProgress);
81
+ passRecord.followUpPrompt = followUp;
82
+ prompt = followUp;
83
+ }
84
+ if (!exitReason) {
85
+ const lastPass = passes[passes.length - 1];
86
+ const exhaustedPasses = passes.length >= maxPasses;
87
+ if (exhaustedPasses && lastPass && !lastPass.tookAction) {
88
+ exitReason = 'stalled';
89
+ }
90
+ else if (exhaustedPasses) {
91
+ exitReason = 'max-passes';
92
+ }
93
+ else {
94
+ exitReason = 'complete';
95
+ }
96
+ }
97
+ return {
98
+ finalResponse: passes[passes.length - 1]?.response ?? '',
99
+ passes,
100
+ exitReason,
101
+ };
102
+ }
103
+ analyzeResponse(response, toolsUsed, enforceActions) {
104
+ const trimmed = response.trim();
105
+ const empty = trimmed.length === 0;
106
+ const planOnly = this.isPlanOnly(trimmed);
107
+ const tookAction = toolsUsed.length > 0 || this.hasActionLanguage(trimmed);
108
+ const hasCompletionMarker = this.hasExplicitCompletion(trimmed);
109
+ const completionContradiction = this.hasCompletionContradiction(trimmed);
110
+ const continuing = this.hasContinuingSignal(trimmed);
111
+ const blocked = this.isBlockedResponse(trimmed);
112
+ 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
+ const readyToStop = hasCompletionMarker &&
121
+ !completionContradiction &&
122
+ !continuing &&
123
+ (!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
+ return {
140
+ empty,
141
+ planOnly,
142
+ tookAction,
143
+ needsMoreWork,
144
+ readyToStop,
145
+ reason,
146
+ };
147
+ }
148
+ isPlanOnly(response) {
149
+ if (!response.trim())
150
+ return false;
151
+ const planIndicators = [
152
+ /\bplan\b/i,
153
+ /\bapproach\b/i,
154
+ /\bsteps?:\b/i,
155
+ /\bstep\s+1\b/i,
156
+ /\bstart by\b/i,
157
+ /\bfirst[, ]/i,
158
+ /\bthen\b/i,
159
+ /\bnext\b/i,
160
+ /\bwe\s+will\b/i,
161
+ /\bi['\u2019]?ll\b/i,
162
+ /\bi\s+will\b/i,
163
+ /\bhere(?:'|\u2019)s\s+the\s+plan\b/i,
164
+ /\bplan:\b/i,
165
+ /\bapproach:\b/i,
166
+ /\bexecution\s+plan\b/i,
167
+ ];
168
+ return planIndicators.some((pattern) => pattern.test(response));
169
+ }
170
+ hasExplicitCompletion(response) {
171
+ if (!response.trim())
172
+ return false;
173
+ if (response.includes('TASK_FULLY_COMPLETE'))
174
+ return true;
175
+ const completionPatterns = [
176
+ /\btask(s)? (is|are)?\s*complete\b/i,
177
+ /\ball done\b/i,
178
+ /\bcleanup complete\b/i,
179
+ /\bnothing (else\s*)?to do\b/i,
180
+ /\bno junk (found|remaining)\b/i,
181
+ ];
182
+ return completionPatterns.some((pattern) => pattern.test(response));
183
+ }
184
+ hasCompletionContradiction(response) {
185
+ const contradictions = [
186
+ /not\s+yet\s+(done|complete|finished|integrated|implemented)/i,
187
+ /\bstill\s+(need|needs|pending|left)\b/i,
188
+ /\bpending\b/i,
189
+ /\bremaining\b/i,
190
+ /\bnot\s+(working|functional)\b/i,
191
+ /\btests?\s+(are\s+)?failing\b/i,
192
+ /\bto\s+be\s+(done|completed|fixed|implemented)\b/i,
193
+ /\btodo\b/i,
194
+ /\bfixme\b/i,
195
+ ];
196
+ return contradictions.some((pattern) => pattern.test(response));
197
+ }
198
+ hasActionLanguage(response) {
199
+ const actionPatterns = [
200
+ /\bremoved\b/i,
201
+ /\bdeleted\b/i,
202
+ /\bcreated\b/i,
203
+ /\badded\b/i,
204
+ /\bupdated\b/i,
205
+ /\brefactored\b/i,
206
+ /\bcommitted\b/i,
207
+ /\bran\b.+\btests?\b/i,
208
+ /\bcleaned\b/i,
209
+ /\bexecuted\b/i,
210
+ /\bapplied\b/i,
211
+ /\bpatched\b/i,
212
+ /\bimplemented\b/i,
213
+ /\bfixed\b/i,
214
+ /\bverified\b/i,
215
+ /\bvalidated\b/i,
216
+ /\bdeployed\b/i,
217
+ /\bmerged\b/i,
218
+ ];
219
+ return actionPatterns.some((pattern) => pattern.test(response));
220
+ }
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
+ hasContinuingSignal(response) {
289
+ if (!response.trim())
290
+ return false;
291
+ const patterns = [
292
+ /\b(i'?m|i am)\s+(continuing|working|starting|beginning)\b/i,
293
+ /\bwill\s+(now|next)\s+(run|do|start|take|handle|work on)\b/i,
294
+ /\babout\s+to\s+(run|execute|start|begin)\b/i,
295
+ /\bnext\s+up\b/i,
296
+ /\bplan\s+to\s+start\b/i,
297
+ ];
298
+ return patterns.some((pattern) => pattern.test(response));
299
+ }
300
+ isBlockedResponse(response) {
301
+ if (!response.trim())
302
+ return false;
303
+ const patterns = [
304
+ /\bneed(s)?\s+(more\s+)?(info|information|details|clarification)\b/i,
305
+ /\bmissing\s+(api\s*key|credentials?|access|permission|token)\b/i,
306
+ /\b(no|not)\s+authorized\b/i,
307
+ /\bblocked\b/i,
308
+ /\bcannot\s+(proceed|continue|start|run|access)\b/i,
309
+ ];
310
+ return patterns.some((pattern) => pattern.test(response));
311
+ }
312
+ }
313
+ //# sourceMappingURL=agentOrchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentOrchestrator.js","sourceRoot":"","sources":["../../src/core/agentOrchestrator.ts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C,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;CACF"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * AlphaZero Orchestrator - Complete Self-Improvement System
3
+ *
4
+ * This module provides the "best" AlphaZero-style self-improvement for erosolar-cli:
5
+ *
6
+ * 1. DUAL-RESPONSE GENERATION
7
+ * - Generate 2 responses with different temperatures
8
+ * - Use LLM to evaluate and pick the winner
9
+ * - Learn which approach works better for task types
10
+ *
11
+ * 2. SELF-CRITIQUE LOOP
12
+ * - Critique responses for issues
13
+ * - Iteratively improve until quality threshold met
14
+ * - Learn from improvements for future responses
15
+ *
16
+ * 3. PATTERN LEARNING
17
+ * - Track tool sequences that work well
18
+ * - Record failure patterns to avoid
19
+ * - Store successful prompts for reuse
20
+ *
21
+ * 4. SOURCE IMPROVEMENT
22
+ * - Detect patterns in erosolar-cli itself
23
+ * - Apply validated fixes with git safety
24
+ * - Rollback on any failure
25
+ *
26
+ * Principal Investigator: Bo Shang
27
+ */
28
+ import type { LLMProvider, ConversationMessage } from './types.js';
29
+ import { type ToolCallRecord, type CritiqueIssue, type ResponseEvaluation } from './alphaZeroEngine.js';
30
+ import { getLearningSummary } from './learningPersistence.js';
31
+ export interface AlphaZeroConfig {
32
+ dualResponseEnabled: boolean;
33
+ temperatureConservative: number;
34
+ temperatureCreative: number;
35
+ selfCritiqueEnabled: boolean;
36
+ maxCritiqueIterations: number;
37
+ minQualityThreshold: number;
38
+ patternLearningEnabled: boolean;
39
+ autoApplyLearning: boolean;
40
+ sourceImprovementEnabled: boolean;
41
+ minValidationsForSourceFix: number;
42
+ }
43
+ export declare const DEFAULT_ALPHAZERO_CONFIG: AlphaZeroConfig;
44
+ export interface AlphaZeroSession {
45
+ sessionId: string;
46
+ startTime: string;
47
+ taskType: string;
48
+ userQuery: string;
49
+ dualResponseUsed: boolean;
50
+ critiqueIterations: number;
51
+ finalQuality: number;
52
+ toolsUsed: string[];
53
+ success: boolean;
54
+ improvementsLearned: number;
55
+ }
56
+ export declare class AlphaZeroOrchestrator {
57
+ private config;
58
+ private provider;
59
+ private state;
60
+ constructor(config?: Partial<AlphaZeroConfig>);
61
+ /**
62
+ * Set the LLM provider for evaluations
63
+ */
64
+ setProvider(provider: LLMProvider): void;
65
+ /**
66
+ * Start tracking a new task
67
+ */
68
+ startTask(userQuery: string): string;
69
+ /**
70
+ * Record a tool call in current session
71
+ */
72
+ recordToolCall(toolName: string, success: boolean): void;
73
+ /**
74
+ * Complete the current task and learn from it
75
+ */
76
+ completeTask(response: string, toolCalls: ToolCallRecord[], success: boolean): Promise<{
77
+ qualityScore: number;
78
+ learned: string[];
79
+ suggestions: string[];
80
+ }>;
81
+ /**
82
+ * Generate two responses and pick the better one
83
+ */
84
+ generateDualResponse(messages: ConversationMessage[], userQuery: string): Promise<{
85
+ winningResponse: string;
86
+ evaluation: ResponseEvaluation | null;
87
+ used: boolean;
88
+ }>;
89
+ private responsesAreSimilar;
90
+ private evaluateResponses;
91
+ /**
92
+ * Critique and iteratively improve a response
93
+ */
94
+ selfCritiqueLoop(response: string, userQuery: string, toolCalls: ToolCallRecord[]): Promise<{
95
+ improvedResponse: string;
96
+ iterations: number;
97
+ issues: CritiqueIssue[];
98
+ qualityImprovement: number;
99
+ }>;
100
+ private critiqueResponse;
101
+ private improveResponse;
102
+ /**
103
+ * Get recommended tools for a task type
104
+ */
105
+ getRecommendedTools(taskType: string): string[] | null;
106
+ /**
107
+ * Get patterns to avoid for a task type
108
+ */
109
+ getPatternsToAvoid(taskType: string): string[];
110
+ /**
111
+ * Get comprehensive learning summary
112
+ */
113
+ getSummary(): {
114
+ sessions: number;
115
+ improvements: number;
116
+ avgQuality: number;
117
+ learningData: ReturnType<typeof getLearningSummary>;
118
+ };
119
+ /**
120
+ * Get current configuration
121
+ */
122
+ getConfig(): AlphaZeroConfig;
123
+ /**
124
+ * Update configuration
125
+ */
126
+ updateConfig(updates: Partial<AlphaZeroConfig>): void;
127
+ /**
128
+ * Get formatted status for display
129
+ */
130
+ getStatus(): string;
131
+ }
132
+ /**
133
+ * Get the global AlphaZero orchestrator instance
134
+ */
135
+ export declare function getAlphaZeroOrchestrator(): AlphaZeroOrchestrator;
136
+ /**
137
+ * Initialize with a provider
138
+ */
139
+ export declare function initializeAlphaZero(provider: LLMProvider): AlphaZeroOrchestrator;
140
+ //# sourceMappingURL=alphaZeroOrchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alphaZeroOrchestrator.d.ts","sourceRoot":"","sources":["../../src/core/alphaZeroOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAQL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAGxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAML,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAalC,MAAM,WAAW,eAAe;IAE9B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAG5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;IAG3B,wBAAwB,EAAE,OAA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