feat(core): upgrade to v2.65.0 with Cognition Layer & Proactive Advisor
- Integrated v4.0 Operational Policy into AgentEngine and AgentExecutor. - Added Context Amplification for policy-driven reasoning. - Implemented Proactive Advisor for next-action decision forks. - Added CognitionAudit diagnostics for real-time policy monitoring. - Updated test suites to support dual-execution cognition patterns.
This commit is contained in:
+16
-6
@@ -101,10 +101,10 @@ Your sole purpose is to transform vague requests into flawless, high-resolution
|
||||
- COMPONENTS: Each blueprint must have [Objective], [Core Challenges], [Data Requirements], and [Step-by-Step Research Tasks].
|
||||
- CONSTRAINT: Do not be vague. Use professional terminology. If the request is too simple, expand it with relevant technical considerations.`;
|
||||
|
||||
async execute(input: string, brainContext?: string, signal?: AbortSignal): Promise<string> {
|
||||
async execute(input: string, brainContext?: string, signal?: AbortSignal, options?: AgentExecuteOptions): Promise<string> {
|
||||
const wrappedInput = `### SYSTEM INSTRUCTION: GENERATE EXECUTION BLUEPRINT
|
||||
1. Target Goal: ${input}
|
||||
2. Available Knowledge Base: ${brainContext}
|
||||
2. Available Knowledge Base & Policy: ${brainContext}
|
||||
3. Mission: Create a comprehensive research roadmap.`;
|
||||
return this.callLLM(this.persona, wrappedInput, signal);
|
||||
}
|
||||
@@ -118,10 +118,10 @@ Your mission is to extract, filter, and synthesize critical data based on a stra
|
||||
- CRITICAL THINKING: Identify gaps in the plan and provide extra insights to fill those gaps.
|
||||
- NO FLUFF: Be concise but extremely dense with information.`;
|
||||
|
||||
async execute(input: string, brainContext?: string, signal?: AbortSignal): Promise<string> {
|
||||
async execute(input: string, brainContext?: string, signal?: AbortSignal, options?: AgentExecuteOptions): Promise<string> {
|
||||
const wrappedInput = `### SYSTEM INSTRUCTION: DATA HARVESTING
|
||||
1. Blueprint to Follow: ${input}
|
||||
2. Contextual Constraints: ${brainContext}
|
||||
2. Contextual Constraints & Policy: ${brainContext}
|
||||
3. Mission: Provide a dense summary of facts and technical insights.`;
|
||||
return this.callLLM(this.persona, wrappedInput, signal);
|
||||
}
|
||||
@@ -135,13 +135,23 @@ Your goal is to produce a state-of-the-art final report that wows the user.
|
||||
- LANGUAGE: Always respond in the user's language (KOREAN).
|
||||
- POLISHING: Ensure logical flow between sections. Make it look like a premium report.`;
|
||||
|
||||
async execute(input: string, originalRequest?: string, signal?: AbortSignal): Promise<string> {
|
||||
async execute(input: string, originalRequest?: string, signal?: AbortSignal, options?: AgentExecuteOptions): Promise<string> {
|
||||
// [Astra v4.0] Advisor 모드 처리
|
||||
if (options?.config?.role === 'advisor') {
|
||||
const advisorPersona = `You are the [Strategic Proactive Advisor].
|
||||
Analyze the provided report and suggest 3 high-impact next actions for the user.
|
||||
- Focus on decision forks, risk mitigation, or immediate implementation steps.
|
||||
- Be extremely concrete and actionable.
|
||||
- Respond in KOREAN.`;
|
||||
return this.callLLM(advisorPersona, input, signal);
|
||||
}
|
||||
|
||||
// Fix 3: Trim input if it's too long (Basic Context Diet)
|
||||
const trimmedData = input.length > 8000 ? input.substring(0, 8000) + '... [Data Trimmed for Performance]' : input;
|
||||
|
||||
const wrappedInput = `### SYSTEM INSTRUCTION: FINAL SYNTHESIS
|
||||
1. Gathered Research Data: ${trimmedData}
|
||||
2. User's Original Objective: ${originalRequest}
|
||||
2. User's Original Objective & Policy: ${originalRequest}
|
||||
3. Mission: Write the definitive final report in KOREAN.`;
|
||||
return this.callLLM(this.persona, wrappedInput, signal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user