diff --git a/CHANGELOG.md b/CHANGELOG.md index d146631..844bc07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,42 @@ 본 프로젝트의 모든 의미있는 변경은 본 파일에 기록한다. 형식: [Keep a Changelog](https://keepachangelog.com/) · 버전: [SemVer](https://semver.org/). +## [0.4.0] — 2026-06-15 + +### Added — Phase 2-B in-app tool calling (Redmine #260) +- **In-process Dart tool runtime** (ADR-0005): MCP 와 동등한 capability 추상화를 별도 서버 없이 in-process Dart 함수로 구현. latency 거의 0. +- **6 tools** (`app/lib/ai/tools/`): `search_catalog`, `query_protocol`, `list_active_habits`, `get_streak` (read-only) / `add_habit`, `log_tracker_entry` (destructive). +- **Multi-turn loop** (`ChatSessionController`) — MAX_TURNS=4 안전 cap, 8-turn soft history warning. `ToolChoice.auto` 로 reply-only + tool call 모두 지원. +- **ConfirmGate 모달** — destructive tool 호출 시 AlertDialog (`이 작업을 수행할까요?`) 의무. 좁은 화면 SingleChildScrollView. +- **2KB result cap** (ADR-0005 §OQ-2) — `encodeToolResult` 가 ToolOk payload 초과 시 `_truncated:true` + `_hint` 로 잘림 (`chat_providers.dart:192` 에서 runtime wire). +- **R 규칙 enforce = 핸들러 책임** — 모델 prompt 학습 아닌 코드 게이트. R3 quota, R5 (habit,date) dedup, R7 회피 키워드, R8 XOR (build/break) 모두 ToolErr 코드로 노출. +- **ChatScreen** (`app/lib/ui/screens/chat_screen.dart`) — 신규 AI 코치 화면. HabitListScreen AppBar 의 🤖 entry (AI opt-in 시). +- **schema SoT = Dart 코드** (ADR-0005 §D-4) — `ToolDefinition.parametersSchema` Map 리터럴. + +### Polish (Designer) +- ToolCallChatMessage 라벨 한국어화 (`_kToolKoreanLabels` — `add_habit → 습관 추가` 등 6종 매핑). +- ConfirmDialog content 를 SingleChildScrollView 로 감싸 좁은 폰 + 긴 description 대응. +- Streaming cursor `▍` 를 `Text.rich` 로 분리 후 `colorScheme.primary` 적용 — 다크 모드 contrast. +- AppBar tooltip `새 대화` → `새 대화 (이전 기록 비우기)`. + +### Added — Tests +- 154/154 passed (1 skip) — 신규 41 → 43 (tool_envelope 6 + catalog_tools 7 + habit_tools 8 + tracker_tools 7 + dispatcher 6 + controller 8 + widget E2E 2). +- AC-9 회귀: 인위 `huge_dump` tool 로 `_truncated:true` + `_hint` 직접 검증. +- AC-10 widget E2E (`test/ui/chat_screen_test.dart`): add_habit 호출 → ConfirmDialog `수행` → habits +1 / `취소` → 무변화 + `취소됨` 라벨. + +### Docs +- 설계서 `docs/design/260-gemma-tool-calling/` (5 파일, 844 라인) — README + 4 함수 fn-spec. +- ADR-0005 — In-app tool calling architecture (4 결정사항). + +### Known follow-ups (후속 이슈 권장) +- `ToolDefinition.koreanLabel` 필드 도입 — 현재 `_kToolKoreanLabels` hardcoded. +- `log_tracker_entry` value=blank 시 confirm skip — 현재 done/blank 무차별 모달. +- `search_catalog` category matching case-insensitive — 모델 hallucination 대비. + +### Release artifact +- `app-release.apk` 287MB (300.9MB raw / 287MB on-disk), SHA-256 `6670da0c4e9bf5e826174ebc48088540867d877cf58699119a519e2ffb40ea3a`. +- Build: `flutter build apk --release` (Gradle assembleRelease 106.4s). + ## [0.3.0] — 2026-06-12 ### Added — Phase 2-A OQ-1 resolved: real Gemma 4 E2B inference (Redmine #218) diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 01000cd..4eefaf8 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -1,7 +1,7 @@ name: life_helper description: "Huberman + Atomic Habits + Tiny Habits + If-Then. Local-first habit/checklist/todo." publish_to: 'none' -version: 0.3.0+3 +version: 0.4.0+4 environment: sdk: ^3.12.2