v2.2.292-296: 메모리·발열 최적화 + Pixel Office 완전 제거 + 소형 모델 추론 강화(calculate/run_code/지식 스코프)

- v2.2.292 메모리·발열: 헬스체크 워크스페이스 쓰기→fs.access(워처 연쇄 제거)·git 검사 비동기 30분 주기,
  웹뷰 retainContextWhenHidden 정리(채팅만 유지), 브레인 인덱스 유휴 30분 TTL 해제,
  채팅 DOM 200개 상한, @lmstudio/sdk 지연 로드
- v2.2.293 Pixel Office 시각화 폐기: astraOffice 모듈·사이드바 매니저 3종·스프라이트 17MB 삭제,
  sidebarProvider collector 섹션 통삭제 (기업 모드 판단 로직 무변경, vsix 12.2MB→1.3MB)
- v2.2.294 도구 메뉴 'NotebookLM 백엔드 실행/종료' 버튼: OS 자동 감지, 프로젝트 자동 탐색+폴더 선택 저장,
  포트 정리 폴백 (터미널 없이 Research 백엔드 켜고 끄기)
- v2.2.295 추론 강화 1탄: [ACTION 16] <calculate> Python 계산 위임(결과 재주입·자가수정 루프),
  단계별 지식 스코프(General+Specialty, 결정적 도메인 분류, 설정 지식·기억 탭 UI)
- v2.2.296 추론 강화 2탄: [ACTION 17] <run_code> 실행 확인(stdout 회수→수정→재실행 루프),
  문법 오류 재주입 자가수정, 도구 라우팅 힌트(dynamicBlocks), Grounding rescue 도메인 스코프 확장
- 검증: jest 818 통과(신규 29개), tsc 무오류, esbuild 정상

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 18:59:47 +09:00
co-authored by Claude Fable 5
parent fa397d7fa1
commit bb7cd6b879
466 changed files with 1285 additions and 6588 deletions
+15 -2
View File
@@ -158,6 +158,8 @@ import type { HandlerContext } from './agent/actions/types';
import { applyFileCreateEditActions } from './agent/actions/fileCreateEdit';
import { applyFileDeleteReadActions } from './agent/actions/fileDeleteRead';
import { applyRunCommandActions } from './agent/actions/runCommand';
import { applyCalculateActions } from './agent/actions/calculate';
import { applyRunCodeActions } from './agent/actions/runCode';
import { applyListFilesActions } from './agent/actions/listFiles';
import { applyWebFetchActions } from './agent/actions/webFetch';
import { applyBrainOpsActions } from './agent/actions/brainOps';
@@ -1275,15 +1277,22 @@ export class AgentExecutor {
// warrant a follow-up LLM call.
const historyLenBeforeActions = this.chatHistory.length;
const report = await this.executeActions(cleanedVisible, rootPath, activeBrain);
const actionsInjectedContext = this.chatHistory.length > historyLenBeforeActions;
let actionsInjectedContext = this.chatHistory.length > historyLenBeforeActions;
// Self-Reflector Phase C — 일반 채팅 경로에서도 코드 파일 생성 직후
// syntax 체크 실행. 옵션 OFF면 통째로 skip.
try {
const cfgC = getConfig();
if (cfgC.selfReflectorExecutionEnabled && report.length > 0) {
const { verifyCreatedFiles } = await import('./features/selfReflector/selfReflectorExecution');
const { verifyCreatedFiles, buildSyntaxFixInstruction } = await import('./features/selfReflector/selfReflectorExecution');
const extra = await verifyCreatedFiles(report, rootPath);
if (extra.length > 0) report.push(...extra);
// [실행 루프] 문법 오류를 보고로 끝내지 않고 대화 컨텍스트로 재주입 —
// 아래 actionsInjectedContext 재계산을 거쳐 자동 후속 턴이 돌고, 모델이
// <edit_file> 로 즉시 수정 → 다음 라운드 재검증되는 자가수정 루프.
const fails = extra.filter((l) => l.startsWith('❌'));
if (fails.length > 0) {
this.chatHistory.push({ role: 'system', internal: true, content: buildSyntaxFixInstruction(fails) });
}
}
} catch (e: any) {
logError('selfReflector.C (chat): hook failed; continuing.', { error: e?.message ?? String(e) });
@@ -1301,6 +1310,8 @@ export class AgentExecutor {
} catch (e: any) {
logError('selfReflector.hollow (chat): hook failed; continuing.', { error: e?.message ?? String(e) });
}
// 검증 훅이 재주입한 컨텍스트(문법 오류 수정 지시)도 후속 턴 트리거에 반영.
actionsInjectedContext = this.chatHistory.length > historyLenBeforeActions;
if (!assistantContent.trim() && report.length === 0) {
const promptCharCount = messagesForRequest.reduce((sum, m) => sum + (m.content?.length ?? 0), 0);
logError('Model returned an empty response without actions.', {
@@ -1706,6 +1717,8 @@ export class AgentExecutor {
await applyFileCreateEditActions(ctx);
await applyFileDeleteReadActions(ctx);
await applyRunCommandActions(ctx);
await applyCalculateActions(ctx);
await applyRunCodeActions(ctx);
await applyListFilesActions(ctx);
await applyWebFetchActions(ctx);
await applyBrainOpsActions(ctx);