diff --git a/package-lock.json b/package-lock.json index 1951cdc..069a2e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "astra", - "version": "2.80.2", + "version": "2.80.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "astra", - "version": "2.80.2", + "version": "2.80.3", "license": "MIT", "dependencies": { "marked": "^18.0.2", diff --git a/package.json b/package.json index 8281e14..37ab76d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "astra", "displayName": "Astra", "description": "The personal intelligence layer for Antigravity and VS Code. A private cognitive partner for deep project context, memory, and proactive strategic decision-making.", - "version": "2.80.2", + "version": "2.80.3", "publisher": "g1nation", "license": "MIT", "icon": "assets/icon.png", diff --git a/src/agent.ts b/src/agent.ts index c190604..2f94abf 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -403,7 +403,13 @@ export class AgentExecutor { "- [충돌] 지식 간 충돌 발생 시 시스템이 독단적으로 판단하지 말고, 반드시 [CONFLICT WARNING] 플래그와 함께 상충되는 두 관점을 모두 명시하여 사용자에게 판단을 위임할 것." ].join('\n'); - const fullSystemPrompt = `${agentSkillCtx}\n\n${systemPrompt}${internetCtx}${memoryCtx}${designerCtx}${localProjectKnowledgeCtx}${thinkingPartnerCtx}${astraStanceCtx}${secondBrainTraceCtx}${v4PolicyCtx}\n\n[CONTEXT]\n${brainContext}${brainInventoryCtx}\n${contextBlock}${negativeCtx}`; + // [Critical Fix] 에이전트 스킬이 있을 경우 기본 포맷(## 요약/상세 설명)보다 에이전트 프롬프트를 우선시하도록 지시 + let coreSystemPrompt = systemPrompt; + if (options.agentSkillContext) { + coreSystemPrompt = `${systemPrompt}\n\n[SELECTED AGENT MODE ACTIVE]\nYou are now operating in a specialized Agent Mode. The instructions below take ABSOLUTE PRECEDENCE over your default persona and default output formats (like ## 요약, ## 상세 설명). Follow the format and role specified in the selected agent mode strictly.\n${agentSkillCtx}`; + } + + const fullSystemPrompt = `${coreSystemPrompt}${internetCtx}${memoryCtx}${designerCtx}${localProjectKnowledgeCtx}${thinkingPartnerCtx}${astraStanceCtx}${secondBrainTraceCtx}${v4PolicyCtx}\n\n[CONTEXT]\n${brainContext}${brainInventoryCtx}\n${contextBlock}${negativeCtx}`; const messagesForRequest: ChatMessage[] = [ { role: 'system', content: fullSystemPrompt, internal: true }, ...reqMessages