diff --git a/.astra/project-context/architecture.md b/.astra/project-context/architecture.md index c7f9aac..02343c6 100644 --- a/.astra/project-context/architecture.md +++ b/.astra/project-context/architecture.md @@ -3,15 +3,15 @@ ## Snapshot -- **Workspace**: `connectai` `v2.2.60` _(absolute path varies by environment; resolved from the active VS Code workspace)_ +- **Workspace**: `connectai` `v2.2.61` _(absolute path varies by environment; resolved from the active VS Code workspace)_ - **Description**: The personal intelligence layer for Antigravity and VS Code. A private cognitive partner for deep project context, memory, and proactive strategic decision-making. - **Stack**: TypeScript, Node.js, VS Code Extension, LM Studio SDK, Test runner -- **Stats**: 271 source files, ~55,157 lines across 5 top-level modules. +- **Stats**: 272 source files, ~55,207 lines across 5 top-level modules. ## Last Refresh -- **Time**: 2026-05-22T06:00:02.986Z +- **Time**: 2026-05-22T06:25:57.973Z - **Files newly analysed**: 1 -- **Files reused from cache**: 270 +- **Files reused from cache**: 271 ## Directory Map ```mermaid @@ -42,7 +42,7 @@ flowchart LR media["media/
6 files"] tests["tests/
35 files"] core_py["core_py/
6 files"] - docs["docs/
85 files"] + docs["docs/
86 files"] tests --> src ``` @@ -65,7 +65,7 @@ flowchart LR ## Modules -### `src/` — 139 files, ~38,157 lines +### `src/` — 139 files, ~38,185 lines **Sub-directories** - `src/features/` (66) — Astra Office — public API. 다음 세션에서 추가될 OfficeSnapshot presenter / schema 도 같은 entry 로 노출 예정. 현재 노출: full webview panel H @@ -93,7 +93,7 @@ flowchart LR - `src/retrieval/scoring.ts` (536 lines) — Scoring Engine — TF-IDF + Bilingual Tokenizer 단순 includes() 키워드 매칭을 넘어서, TF-IDF 가중치 기반의 문서 스코어링을 제공합니다. 한국어/영어 양국어 토크나이저를 포함합니다. - `src/skills/agentKnowledgeMap.ts` (374 lines) - `src/retrieval/lessonHelpers.ts` (325 lines) — Lesson / Experience Memory — pure helpers (no vscode dependency) "Lesson" = a markdown file in the active brain that captures a past mistake/risk and how to avoid repeating it. Identified by a lessons -- `src/agent.ts` (3694 lines) +- `src/agent.ts` (3722 lines) - `src/features/providers/types.ts` (63 lines) — Cloud LLM provider routing — model id prefix → provider id 매핑. Prefix 규칙: openrouter:anthropic/claude-3.5-sonnet → { provider: 'openrouter', model: 'anthropic/claude-3.5-sonnet' } anthropic:claude-3-5 - `src/lib/engine.ts` (906 lines) - `src/retrieval/brainIndex.ts` (325 lines) — Brain Index — persistent, mtime-keyed tokenized cache of the Second Brain RAG 검색은 매 질의마다 브레인의 모든 .md 파일을 읽고 토크나이즈해서 TF-IDF 점수를 계산했습니다 — 파일 수가 많아지면 그게 병목입니다. 이 모듈은 /.astra/brain-index.json 에 @@ -161,10 +161,10 @@ flowchart LR - `core_py/optimizer.py` (55 lines) - `core_py/queue_worker.py` (82 lines) -### `docs/` — 85 files, ~3,294 lines +### `docs/` — 86 files, ~3,316 lines **Sub-directories** -- `docs/records/` (72) — Bug: /Volumes/Data/project/Antigravity/ConnectAI 프로젝트 코드 리뷰 해줄 수 있어? 개선할 부분이 있는지, 그러고... +- `docs/records/` (73) — Bug: /Volumes/Data/project/Antigravity/ConnectAI 프로젝트 코드 리뷰 해줄 수 있어? 개선할 부분이 있는지, 그러고... - `docs/docs/` (5) — Bug: Viewed integrationretrieval.test.ts:1-59 integrationretrieval.test.ts를 통해 ... - `docs/Meeting/` (0) @@ -175,7 +175,7 @@ flowchart LR - `docs/EXPERIENCE_MEMORY_PLAN.md` (122 lines) — Experience Memory (Mistake / Lesson Loop) — Implementation Plan - `docs/records/ConnectAI/development/2026-05-02_connectai_project_knowledge_overview.md` (121 lines) — Astra Project Knowledge Overview - `docs/records/ConnectAI/development/2026-05-03_connectai_project_knowledge_overview.md` (121 lines) — Astra Project Knowledge Overview -- `docs/records/ConnectAI/timeline.md` (167 lines) — Project Timeline +- `docs/records/ConnectAI/timeline.md` (170 lines) — Project Timeline - `docs/Advanced_Features_Implementation_Guide.md` (40 lines) — Advanced Features Implementation Guide - `docs/docs/records/docs/bugs/BUG-0001-viewed-integration-retrieval-test-ts-1-59-integration-retrie.md` (16 lines) — Bug: Viewed integrationretrieval.test.ts:1-59 integrationretrieval.test.ts를 통해 ... - `docs/docs/records/docs/chronicle.config.json` (11 lines) — JSON configuration @@ -336,7 +336,7 @@ Astra는 대표님의 명시적인 승인 하에 로컬 시스템의 강력한 **Designed for High-Performance Decision Making.** Copyright (C) **g1nation**. All rights reserved. -_Last auto-scan: 2026-05-22T06:00:02.986Z · signature `3e9af639`_ +_Last auto-scan: 2026-05-22T06:25:57.973Z · signature `32c602bb`_ ## Purpose diff --git a/.astra/project-context/scan-cache.json b/.astra/project-context/scan-cache.json index 02c51df..7ba780e 100644 --- a/.astra/project-context/scan-cache.json +++ b/.astra/project-context/scan-cache.json @@ -1,11 +1,11 @@ { "version": 1, - "generatedAt": "2026-05-22T06:00:03.020Z", + "generatedAt": "2026-05-22T06:25:58.013Z", "files": { "src/agent.ts": { - "mtimeMs": 1779428598292.2295, - "size": 216127, - "lines": 3694, + "mtimeMs": 1779430182152.1404, + "size": 217774, + "lines": 3722, "role": "", "imports": [ "src/utils", @@ -1977,7 +1977,7 @@ "imports": [] }, "docs/records/ConnectAI/chronicle.config.json": { - "mtimeMs": 1779429578331.412, + "mtimeMs": 1779430497353.3203, "size": 371, "lines": 11, "role": "JSON configuration", @@ -2116,6 +2116,13 @@ "role": "ADR: 오늘 팀별 보고를 했어. 그냥 하는게 너무 심적으로 힘든데 어떻게 개선할 수 있을까?", "imports": [] }, + "docs/records/ConnectAI/decisions/ADR-0020-a팀장이-있어-팀원으로-b가-있고-c가-있어-a팀장은-0라는-이사의-제안을-받아서-다른-회사로-가기로-했어-.md": { + "mtimeMs": 1779430149727.801, + "size": 2341, + "lines": 19, + "role": "ADR: A팀장이 있어. 팀원으로 B가 있고 C가 있어. A팀장은 0라는 이사의 제안을 받아서 다른 회사로 가기로 했어. 이 소문이 퍼져서 B와 C도 알...", + "imports": [] + }, "docs/records/ConnectAI/development/2026-05-02_answer-format-readability-tuning.md": { "mtimeMs": 1778028987330.4185, "size": 1564, @@ -2376,9 +2383,9 @@ "imports": [] }, "docs/records/ConnectAI/timeline.md": { - "mtimeMs": 1779420342806.9556, - "size": 10866, - "lines": 167, + "mtimeMs": 1779430149729.8076, + "size": 11074, + "lines": 170, "role": "Project Timeline", "imports": [] }, diff --git a/.astra/tests/stress/.astra/cache/259a37934ead3910a8722b82054d46d2ca2057b05c488be1dcf439166ac5a9a1.json b/.astra/tests/stress/.astra/cache/259a37934ead3910a8722b82054d46d2ca2057b05c488be1dcf439166ac5a9a1.json index 50f67e0..ed6597e 100644 --- a/.astra/tests/stress/.astra/cache/259a37934ead3910a8722b82054d46d2ca2057b05c488be1dcf439166ac5a9a1.json +++ b/.astra/tests/stress/.astra/cache/259a37934ead3910a8722b82054d46d2ca2057b05c488be1dcf439166ac5a9a1.json @@ -1,5 +1,5 @@ { "result": "Final report with inconsistencies. This should be long enough to pass validation.", - "createdAt": 1779429500111, + "createdAt": 1779430407981, "modelVersion": "unknown" } \ No newline at end of file diff --git a/.astra/tests/stress/.astra/cache/65775be352df43297b63c7af59c9f4f39d2bc368f77456c37b5eef9a94a66b5c.json b/.astra/tests/stress/.astra/cache/65775be352df43297b63c7af59c9f4f39d2bc368f77456c37b5eef9a94a66b5c.json index dc2fa4c..ac836c7 100644 --- a/.astra/tests/stress/.astra/cache/65775be352df43297b63c7af59c9f4f39d2bc368f77456c37b5eef9a94a66b5c.json +++ b/.astra/tests/stress/.astra/cache/65775be352df43297b63c7af59c9f4f39d2bc368f77456c37b5eef9a94a66b5c.json @@ -1,5 +1,5 @@ { "result": "[CONFLICT WARNING] 성능이 200% 증가했습니다. vs 그러나 동시에 50% 감소했습니다. 최적화와 성능 저하가 동시에 발견됨.", - "createdAt": 1779429500108, + "createdAt": 1779430407979, "modelVersion": "unknown" } \ No newline at end of file diff --git a/.astra/tests/stress/.astra/cache/6894d26c5b0a55d25d756a473225c7a44d7661af673b24e3f49551a7a2e50280.json b/.astra/tests/stress/.astra/cache/6894d26c5b0a55d25d756a473225c7a44d7661af673b24e3f49551a7a2e50280.json index 53f2f19..72db54c 100644 --- a/.astra/tests/stress/.astra/cache/6894d26c5b0a55d25d756a473225c7a44d7661af673b24e3f49551a7a2e50280.json +++ b/.astra/tests/stress/.astra/cache/6894d26c5b0a55d25d756a473225c7a44d7661af673b24e3f49551a7a2e50280.json @@ -1,5 +1,5 @@ { "result": "Detailed Execution Plan: 1. Research 2. Analyze 3. Write report with high quality.", - "createdAt": 1779429500106, + "createdAt": 1779430407976, "modelVersion": "unknown" } \ No newline at end of file diff --git a/.astra/tests/stress/.astra/cache/88cb61499f88ed38165b64bd3e8adc543795e4b427b64540a49c9ab27c7fe213.json b/.astra/tests/stress/.astra/cache/88cb61499f88ed38165b64bd3e8adc543795e4b427b64540a49c9ab27c7fe213.json index 510e953..fb0fede 100644 --- a/.astra/tests/stress/.astra/cache/88cb61499f88ed38165b64bd3e8adc543795e4b427b64540a49c9ab27c7fe213.json +++ b/.astra/tests/stress/.astra/cache/88cb61499f88ed38165b64bd3e8adc543795e4b427b64540a49c9ab27c7fe213.json @@ -1,5 +1,5 @@ { - "result": "---\nid: stress_conflict_1779429500089\ndate: 2026-05-22T05:58:20.112Z\ntype: knowledge_artifact\nstandard: P-Reinforce v3.0\ntags: [automated, connect_ai, brain_sync]\n---\n\n## 📌 Brief Summary\nFinal report with inconsistencies. This should be long enough to pass validation.\n\nFinal report with inconsistencies. This should be long enough to pass validation.\n\n---\n## 💡 Astra의 선제적 제안 (Proactive Next Actions)\nFinal report with inconsistencies. This should be long enough to pass validation.\n---\n## 🛡️ Reliability & Audit Summary\n> [!NOTE]\n> 이 문서는 ConnectAI의 **Intelligent Resilience** 엔진에 의해 검증 및 정제되었습니다.\n\n| Metric | Value | Status |\n| :--- | :--- | :--- |\n| **Conflict Risk** | `60/100` | ⚠️ Medium |\n| **Fallbacks Used** | `0` | ✅ None |\n| **Auto Retries** | `0` | ✅ Stable |\n| **Deduplication** | `0` | Standard |\n| **Processing Time** | `0.0s` | ✅ Fast |\n\n### 🔍 Decision Audit Trail\n- **[PLANNER]** 전략 수립 중... (15ms)\n- **[RESEARCHER]** 핵심 정보 수집 및 분석 중... (3ms)\n- **[WRITER]** 최종 리포트 작성 및 편집 중... (3ms)\n", - "createdAt": 1779429500113, + "result": "---\nid: stress_conflict_1779430407960\ndate: 2026-05-22T06:13:27.983Z\ntype: knowledge_artifact\nstandard: P-Reinforce v3.0\ntags: [automated, connect_ai, brain_sync]\n---\n\n## 📌 Brief Summary\nFinal report with inconsistencies. This should be long enough to pass validation.\n\nFinal report with inconsistencies. This should be long enough to pass validation.\n\n---\n## 💡 Astra의 선제적 제안 (Proactive Next Actions)\nFinal report with inconsistencies. This should be long enough to pass validation.\n---\n## 🛡️ Reliability & Audit Summary\n> [!NOTE]\n> 이 문서는 ConnectAI의 **Intelligent Resilience** 엔진에 의해 검증 및 정제되었습니다.\n\n| Metric | Value | Status |\n| :--- | :--- | :--- |\n| **Conflict Risk** | `60/100` | ⚠️ Medium |\n| **Fallbacks Used** | `0` | ✅ None |\n| **Auto Retries** | `0` | ✅ Stable |\n| **Deduplication** | `0` | Standard |\n| **Processing Time** | `0.0s` | ✅ Fast |\n\n### 🔍 Decision Audit Trail\n- **[PLANNER]** 전략 수립 중... (15ms)\n- **[RESEARCHER]** 핵심 정보 수집 및 분석 중... (2ms)\n- **[WRITER]** 최종 리포트 작성 및 편집 중... (4ms)\n", + "createdAt": 1779430407983, "modelVersion": "unknown" } \ No newline at end of file diff --git a/.astra/tests/stress/.astra/missions/stress_conflict_1779429500089.json b/.astra/tests/stress/.astra/missions/stress_conflict_1779430407960.json similarity index 81% rename from .astra/tests/stress/.astra/missions/stress_conflict_1779429500089.json rename to .astra/tests/stress/.astra/missions/stress_conflict_1779430407960.json index 096f29c..a72b1d7 100644 --- a/.astra/tests/stress/.astra/missions/stress_conflict_1779429500089.json +++ b/.astra/tests/stress/.astra/missions/stress_conflict_1779430407960.json @@ -1,8 +1,8 @@ { - "missionId": "stress_conflict_1779429500089", + "missionId": "stress_conflict_1779430407960", "status": "completed", - "startTime": "2026-05-22T05:58:20.089Z", - "totalElapsedMs": 25, + "startTime": "2026-05-22T06:13:27.960Z", + "totalElapsedMs": 24, "results": { "planner": "Detailed Execution Plan: 1. Research 2. Analyze 3. Write report with high quality.", "researcher": "[CONFLICT WARNING] 성능이 200% 증가했습니다. vs 그러나 동시에 50% 감소했습니다. 최적화와 성능 저하가 동시에 발견됨.", @@ -18,28 +18,28 @@ "to": "planner", "durationMs": 15, "message": "전략 수립 중...", - "ts": "2026-05-22T05:58:20.104Z" + "ts": "2026-05-22T06:13:27.975Z" }, { "from": "planner", "to": "researcher", - "durationMs": 3, + "durationMs": 2, "message": "핵심 정보 수집 및 분석 중...", - "ts": "2026-05-22T05:58:20.107Z" + "ts": "2026-05-22T06:13:27.977Z" }, { "from": "researcher", "to": "writer", - "durationMs": 3, + "durationMs": 4, "message": "최종 리포트 작성 및 편집 중...", - "ts": "2026-05-22T05:58:20.110Z" + "ts": "2026-05-22T06:13:27.981Z" }, { "from": "writer", "to": "completed", "durationMs": 3, "message": "미션 완료", - "ts": "2026-05-22T05:58:20.113Z" + "ts": "2026-05-22T06:13:27.984Z" } ], "resilienceMetrics": { diff --git a/PATCHNOTES.md b/PATCHNOTES.md index 2e8f891..7fd1588 100644 --- a/PATCHNOTES.md +++ b/PATCHNOTES.md @@ -1,5 +1,17 @@ # Astra Patch Notes +## v2.2.61 (2026-05-22) +### 🔁 출력 없는 액션엔 2번째 LLM 호출 생략 — "빈 응답" 근본 원인 제거 +- **문제:** `git 커밋해줘` 한 번에 LLM이 2번 호출됨 — ①`` 액션을 뱉는 호출, ②결과를 정리하는 continuation 호출. 2번째가 빈 응답(`eosFound`)으로 실패. +- **원인:** `run_command`는 터미널 출력을 캡처하지 않아 대화에 주입하는 내용이 없는데도, ASTRA는 continuation에서 26K+ 토큰 전체 컨텍스트를 다시 실어 "결과를 보고 답하라"는 무의미한 2번째 호출을 함. 빈약한 로컬 모델이 81% 찬 컨텍스트에서 붕괴(첫 토큰부터 EOS). 타이밍 race가 아니라 불필요하게 무거운 2번째 호출이 원인. +- **수정:** 액션이 모델이 해석할 내용을 실제로 주입했는지(`read_file`/`list_files`/`read_brain`/`read_sheet`는 시스템 메시지 주입, `run_command`·파일 생성/수정/삭제는 주입 없음) 판정. **주입이 없으면 continuation LLM 호출을 생략**하고 결정론적 확정 메시지("실행한 작업: …")만 출력. 읽기 계열 액션엔 continuation 유지. +- 효과: `run_command`·파일 쓰기 후 빈 응답이 사라지고, 더 빠르고(불필요한 26K 토큰 호출 제거) 실제 실행된 명령을 그대로 확인 가능. +- **신규 패키징:** `astra-2.2.61.vsix`. + +--- + + + ## v2.2.60 (2026-05-22) ### 🔧 `&&` 명령 체이닝 — 코드 레벨에서 PowerShell 문법으로 자동 변환 - **문제:** v2.2.59에서 프롬프트로 "`&&` 쓰지 말라"고 지시했으나, 모델이 여전히 `cd ... && git add . && git commit ... && git push`를 출력 → PowerShell 5.1에서 `'&&' 토큰은 올바른 문 구분 기호가 아닙니다` 파서 오류로 **명령 전체가 실행 실패**. diff --git a/docs/records/ConnectAI/chronicle.config.json b/docs/records/ConnectAI/chronicle.config.json index c2a5a7f..d509291 100644 --- a/docs/records/ConnectAI/chronicle.config.json +++ b/docs/records/ConnectAI/chronicle.config.json @@ -7,5 +7,5 @@ "corePurpose": "", "detailLevel": "standard", "createdAt": "2026-05-20T09:42:40.003Z", - "updatedAt": "2026-05-22T05:59:38.330Z" + "updatedAt": "2026-05-22T06:26:09.044Z" } diff --git a/docs/records/ConnectAI/decisions/ADR-0020-a팀장이-있어-팀원으로-b가-있고-c가-있어-a팀장은-0라는-이사의-제안을-받아서-다른-회사로-가기로-했어-.md b/docs/records/ConnectAI/decisions/ADR-0020-a팀장이-있어-팀원으로-b가-있고-c가-있어-a팀장은-0라는-이사의-제안을-받아서-다른-회사로-가기로-했어-.md new file mode 100644 index 0000000..fe97028 --- /dev/null +++ b/docs/records/ConnectAI/decisions/ADR-0020-a팀장이-있어-팀원으로-b가-있고-c가-있어-a팀장은-0라는-이사의-제안을-받아서-다른-회사로-가기로-했어-.md @@ -0,0 +1,19 @@ +# ADR: A팀장이 있어. 팀원으로 B가 있고 C가 있어. A팀장은 0라는 이사의 제안을 받아서 다른 회사로 가기로 했어. 이 소문이 퍼져서 B와 C도 알... + +## Status +accepted + +## Context +A팀장이 있어. 팀원으로 B가 있고 C가 있어. A팀장은 0라는 이사의 제안을 받아서 다른 회사로 가기로 했어. 이 소문이 퍼져서 B와 C도 알게 되었지. 그러고 2일 뒤 B와 C가 A를 불러서 회의를 함. 그러고 질문을 하고. 갑자기 그럼 나 이일 (지금 작업하고 있는) 하고 싶지 않다 부담된다. 그러고 다음날 풀렸어. 그러곤 4일째되는날 A가 B에게 업무 지시, 피드백을 하는데 B가, 왜 하나 하나 다 참견이냐,, 하면서 화를 냄. 그래서 A가 선은 넘지 말아달라 하니까. B가 화가 나서. 막말을 하기 시작함. 시바, 좇도 실력 없는게 팀장이면 다냐 하고 멱살 잡고 밀쳐 냈다네. 이거 분석해줘. + +## Decision +이 사건은 단순한 갈등을 넘어 **'조직의 신뢰 구조(Trust Structure)가 완전히 붕점된 상태'**를 보여줍니다. 팀장의 이직 결정이라는 외부 충격이 조직 내부에 '불안정성'을 전파했고, 이것이 구성원들의 심리적 방어 기제와 결합되어 폭발한 케이스입니다. 상황을 **심리학적/조직관리적 관점**에서 세 가지 단계로 분석해 드립니다. ## 1. 트리거(Trigger): 리더십 공백과 '신뢰의 진폭' 발생 * **현상:** 팀장 A가 이직을 결정한 순간, 조직 내 '리더십의 권위'와 '안정성'이 동시에 무너졌습니다. * **분석:** 구성원 B와 C에게 팀장의 이직은 단순히 사람이 바뀌는 것이 아니라, **"우리가 믿고 따를 수 있는 체계가 사라짐"**을 의미합니다. 소문이 퍼지면서 발생한 불안감이 '업무 하고 싶지 않다'라는 극단적인 거부 반응(심리적 퇴행)으로 나타난 것입니다서입니다. * **결과:** 팀장이 자리를 비우는 상황에서 구성원들은 '나도 버려질 수 있다' 혹은 ... + +## Reason +Captured automatically because the conversation contained decision-oriented language. + +## Alternatives +Not captured yet. + +## Consequences +- Future prompts should treat this as project context unless the user changes direction. diff --git a/docs/records/ConnectAI/discussions/2026-05-22_e-wiki-connectai-git에-커밋하고-푸쉬해줘.md b/docs/records/ConnectAI/discussions/2026-05-22_e-wiki-connectai-git에-커밋하고-푸쉬해줘.md new file mode 100644 index 0000000..9166f67 --- /dev/null +++ b/docs/records/ConnectAI/discussions/2026-05-22_e-wiki-connectai-git에-커밋하고-푸쉬해줘.md @@ -0,0 +1,16 @@ +# Discussion: E:\Wiki\connectai git에 커밋하고 푸쉬해줘. + +## User Request Summary +E:\Wiki\connectai git에 커밋하고 푸쉬해줘. + +## Interpreted Intent +Capture a meaningful project discussion automatically instead of requiring manual record selection. + +## Questions +No explicit question was captured. + +## Main Discussion +- `E:\Wiki\connectai` 프로젝트의 변경 사항을 Git에 반영하기 위해 `add`, `commit`, `push` 명령어를 실행하겠습니다. cd 'E:\Wiki\connectai' && git add . && git commit -m 'Update project files' && git push origin main `E:\Wiki\connectai`의 변경 사항을 `add`, `commit`, `push` 스크립트로 처리했습니다. + +## Decisions +No decisions captured yet. diff --git a/docs/records/ConnectAI/timeline.md b/docs/records/ConnectAI/timeline.md index ef5367b..3911d05 100644 --- a/docs/records/ConnectAI/timeline.md +++ b/docs/records/ConnectAI/timeline.md @@ -165,3 +165,9 @@ ## 2026-05-22 - Auto decision record created: decisions\ADR-0019-오늘-팀별-보고를-했어-그냥-하는게-너무-심적으로-힘든데-어떻게-개선할-수-있을까.md + +## 2026-05-22 +- Auto decision record created: decisions\ADR-0020-a팀장이-있어-팀원으로-b가-있고-c가-있어-a팀장은-0라는-이사의-제안을-받아서-다른-회사로-가기로-했어-.md + +## 2026-05-22 +- Auto discussion record created: discussions\2026-05-22_e-wiki-connectai-git에-커밋하고-푸쉬해줘.md diff --git a/package-lock.json b/package-lock.json index 3be79b7..8951749 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "astra", - "version": "2.2.59", + "version": "2.2.61", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "astra", - "version": "2.2.60", + "version": "2.2.61", "license": "MIT", "dependencies": { "@lmstudio/sdk": "^1.5.0", diff --git a/package.json b/package.json index e024572..a964b4f 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.2.60", + "version": "2.2.61", "publisher": "g1nation", "license": "MIT", "icon": "assets/icon.png", diff --git a/src/agent.ts b/src/agent.ts index 2a3a940..04e37bd 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -1188,7 +1188,13 @@ export class AgentExecutor { this.statusBarManager.updateStatus(AgentStatus.Executing); // Action tags are honored only from the visible final answer — never from hidden reasoning. + // Snapshot history length so we can tell whether the actions injected any content for the + // model to interpret: read_file / list_files / read_brain / read_sheet push system messages, + // while run_command (no stdout captured) and file writes inject nothing. Only the former + // 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; // Self-Reflector Phase C — 일반 채팅 경로에서도 코드 파일 생성 직후 // syntax 체크 실행. 옵션 OFF면 통째로 skip. try { @@ -1263,8 +1269,13 @@ export class AgentExecutor { if (report.length > 0) { logInfo('Agent actions executed.', { loopDepth: loopDepth + 1, report }); - // Continue loop if needed - if (loopDepth < config.maxAutoSteps) { + // A follow-up LLM call ("continuation") is only worth making when an action injected + // content the model must interpret (read_file / list_files / read_brain / read_sheet). + // Output-less actions — run_command (no stdout captured), file create/edit/delete — + // give the continuation nothing to do, yet it would re-send the whole, often near-full, + // context; on a weak/long-context local model that second call collapses to an empty + // response. For those, confirm deterministically and stop. No second LLM call. + if (actionsInjectedContext && loopDepth < config.maxAutoSteps) { const currentActionStr = report.join('|'); const lastActionStr = this.context.workspaceState.get('lastActionStr'); @@ -1283,6 +1294,13 @@ export class AgentExecutor { await new Promise(r => setTimeout(r, 800)); if (this.isStaleRun(runId)) return; await this.handlePrompt(continuationPrompt, modelName, { ...options, loopDepth: loopDepth + 1, runId }); + } else if (!actionsInjectedContext) { + // Output-less actions — confirm what actually ran (deterministic), no follow-up LLM call. + logInfo('Actions produced no interpretable output — skipping continuation call.', { loopDepth, report }); + this.webview.postMessage({ + type: 'streamChunk', + value: '\n\n---\n실행한 작업:\n' + report.map(r => `- ${r}`).join('\n'), + }); } return; }