Commit Graph
100 Commits
Author SHA1 Message Date
kim 209f3a3aef v3.0.6: RP2040 에뮬레이터 개선 — USB CDC, vendor화, 부팅 감지
- USB CDC 경로 복원: #define Serial Serial1 우회 제거
- rp2040js/avr8js/codemirror/xterm/monaco-editor vendor화
- /vendor 정적 라우팅 추가 (Express 5 catch-all 우회)
- 부팅 완료 타임아웃 감지 (Serial 출력 없어도 8초 후 RAF 전환)
- 리셋 시 Simulator 재생성으로 주변 장치 상태 초기화
- 시리얼 패널의 내부 메시지를 console.log로 이동
2026-06-19 15:49:36 +09:00
kimandClaude Sonnet 4.6 23831f79ba v3.0.5: RP2040 브라우저 에뮬레이터 — rp2040js 기반 전체 구현
- RP2040(Pico) 보드 감지·컴파일·에뮬레이션 지원 추가
  - Serial → Serial1(UART0) 자동 리다이렉트 (#define 삽입)
  - .uf2 파일 우선 추출, bootrom 자동 다운로드·캐싱
  - ELF .text 추출: arm-none-eabi-objcopy 대신 Node.js 내장 파서
  - HTTP 302 리다이렉트 자동 팔로우 (_httpsGetFollow)
- rp2040js 에뮬레이터: fast-path 초기화 루프, 피코 SVG 보드, GPIO25 LED
- 예외 처리: HardFault(#3)만 중지, 나머지 IRQ/SysTick 정상 통과
- UART onByte: TextDecoder stream 모드로 한글 UTF-8 정상 출력
- heartbeat 메시지 제거
- WiFi scan mock: WSCN 프로토콜로 C++ ↔ 브라우저 동기화, UI 편집 지원
- 에뮬레이터 팝업 → 코드 에디터 인라인 iframe 패널로 전환
- CDN 의존성 → /vendor/ 로컬 서빙 (xterm, Monaco)
- SSE 세션 idle timer (창 닫힘 후 5분 자동 종료)
- 업로드: 속도 자동 재시도(921600→460800→230400) + FlashMode fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 13:37:56 +09:00
kimandClaude Sonnet 4.6 5a7c38b26d v3.0.4: 업로드 패널 컴파일 캐시 — 컴파일 후 업로드 시 재컴파일 생략
- 컴파일 결과를 (code, fqbn) 키로 캐시
- 사이드바 🔨 컴파일 성공 시에도 캐시 저장
- 캐시 히트 시 업로드/다운로드에서 컴파일 단계 건너뜀

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 00:04:06 +09:00
kimandClaude Sonnet 4.6 4caa35aac2 v3.0.3: 아두이노 업로더 통합 — 팝업 제거, 코드 에디터 하단 패널로 이전
- arduino-upload.html 삭제, 모든 로직을 code.js로 이식
- ⚡ 업로드 버튼 → 인라인 패널 오픈 (팝업·sessionStorage 릴레이 제거)
- OUTPUT / 옵션 / 시리얼 탭, 드래그 리사이즈, ESP32·AVR·STM32 업로드
- server-v2.ts 중복 /api/settings/paths 라우트 제거 (설정 저장 오류 수정)
- 업로드 패널 색상·폰트 개선 (배경 밝게, 12~13px)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 23:59:46 +09:00
kimandClaude Sonnet 4.6 a994ac1b73 v3.0.2: server-v2 모듈 분리 — Arduino·PPTX 라우트 추출 (-2923줄)
- routes-arduino.ts: Arduino 컴파일/라이브러리/QEMU/ESP8266 에뮬 전체
- routes-pptx.ts: PPTX 생성/편집/PDF/이미지 API 전체
- mocks-esp32: WiFi.STA(_STAProxy), scanNetworks, DELETE() 수정
- mocks-esp8266: DELETE() 수정
- server-v2.ts: 16106 → 13183줄 (–18%)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 21:00:40 +09:00
kimandClaude Sonnet 4.6 18b9d5ba74 v3.0.1: 에뮬레이터 업그레이드 — 정지/재시작, UTF-8 시리얼, CodeMirror, 속도슬라이더
코드 에디터 (code.html / code.js)
- xterm → @xterm/xterm 5.5.0 마이그레이션 (UMD 전역명 AddonFit/AddonWebLinks)
- Monaco Editor 0.52.0 업그레이드
- AI 패널 CSS 변수 (--ai-hdr-bg 등) 다크/라이트 테마 분리
- Arduino/GCC/Python/JS 오류 패턴(_ERROR_PATTERNS) 확장

Arduino 에뮬레이터 (arduino-emulator.html)
- CodeMirror 5 스케치 에디터 내장 (C++ 구문 강조, BroadcastChannel 동기화)
- 속도 select → range 슬라이더 (1x~최대, 로그 스케일)
- 시리얼 UTF-8: 수동 바이트버퍼 → 스트리밍 TextDecoder({ stream:true })로 교체 (°C 깨짐 수정)
- 정지/시작 토글 버튼 추가 (AVR: togglePower, ESP32/ESP8266: pause↔restart)
- 회로→코드 버튼 (🤖) 추가
- 보드 타이틀 FQBN 기반 동적 설정

서버 (server-v2.ts)
- QEMU/ESP8266 restart 엔드포인트: old PTY exit 핸들러가 새 세션을 삭제하던 레이스컨디션 수정 (s.pty = null 가드)
- ESP8266 /pause 엔드포인트 추가
- 정지 시 DELETE → pause로 변경 (세션·firmware 유지, 재시작 가능)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 20:12:05 +09:00
kimandClaude Sonnet 4.6 8b649e96d5 Arduino 컴파일: 누락 라이브러리 자동 설치 후 재컴파일
컴파일 에러에서 'fatal error: Foo.h: No such file or directory' 파싱 →
arduino-cli lib search로 최적 라이브러리 찾기 → 자동 설치 → 재컴파일.
성공 시 autoInstalled[] 포함하여 반환, 클라이언트는 "📦 자동 설치" 시스템 메시지 표시.
에러 지속 시 sendCompileErrorToAI()로 AI 채팅에 전달.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 23:03:54 +09:00
kimandClaude Sonnet 4.6 0c46d52f42 코드 에디터: Arduino 컴파일 오류를 AI 채팅으로 자동 전송
오류 발생 시 codeAiAppend(system) 대신 sendCompileErrorToAI()로
에러 메시지 + 코드 컨텍스트를 AI 입력창에 넣고 즉시 전송.
arduino / esp32 / 에뮬레이터 버튼 세 경로 모두 적용.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:59:50 +09:00
kimandClaude Sonnet 4.6 e3920dd157 코드 에디터: 터미널 버튼 아래에 에뮬레이터 버튼 추가
.ino 파일이 열려 있으면 자동 컴파일 후 에뮬레이터 탭 열기,
아니면 에뮬레이터 창만 열기. 컴파일 중 버튼 텍스트로 상태 표시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:54:23 +09:00
kimandClaude Sonnet 4.6 e69606dc31 Arduino 에뮬레이터: 브레드보드 + JS SPICE(MNA) 시뮬레이터 내장
- 30행 × 10홀(a-e, f-j) 캔버스 브레드보드 — 와이어/저항/LED/커패시터/버튼 배치
- LED 삼각형 심볼 + 켜짐/꺼짐 글로우 렌더링
- MNA(Modified Nodal Analysis) Newton-Raphson SPICE 솔버 — 순수 JS, 60회 수렴
- 현실적 LED 모델: Is=4.2e-21 A (Red: Vf≈2.0V@20mA 정확)
- SPICE 넷리스트 자동 생성 + .cir 내보내기
- Arduino GPIO 핀 상태 → SPICE 전압원 실시간 반영 (D13 HIGH → 5V)
- 드래그 가능한 플로팅 팝업, 브레드보드/SPICE 탭 전환

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:50:20 +09:00
kimandClaude Sonnet 4.6 63918633cb Arduino emulator: 보드 패널 340px 확장 + canvas pixelated 렌더링
좌측 패널 280→340px 로 넓혀 OLED 캔버스가 256×128 CSS px 1:1
렌더링되도록 수정. max-width:100% 스케일 다운 시 bilinear 번짐
방지를 위해 image-rendering:pixelated 추가. overflow:hidden →
overflow-y:auto 로 변경해 패널 내용 클리핑 방지.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 18:04:41 +09:00
kimandClaude Fable 5 a12e671e80 Arduino 에뮬레이터: OLED 2x 렌더링으로 교체 — CSS 스케일링 의존 제거
aspect-ratio:2/1 미지원 브라우저에서 캔버스가 64px 자연 높이로
렌더링되어 가로로만 늘어나 '줄만 몇 개'로 보이는 버그 수정.

- canvas 128×64 → 256×128 (물리 픽셀 2배)
- JS 렌더러: 논리 픽셀 1개 → 2×2 물리 픽셀로 직접 기록
- CSS: image-rendering:pixelated + aspect-ratio 제거
  → max-width:100%; height:auto 로 브라우저 자연 스케일링

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:45:11 +09:00
kimandClaude Fable 5 cd269f017e Arduino 에뮬레이터: OLED 캔버스 크기 수정 + 플레이스홀더
- 캔버스 width:256px → width:100%; aspect-ratio:2/1
  (보드 패널 280px 기준 오버플로우·클리핑 해소)
- OLED 섹션 항상 표시, 연결 전 플레이스홀더:
  "OLED 연결 대기 / 0x3C / 0x3D" + 점선 격자
- 파란 점(dot) 인디케이터: 연결 전=꺼짐, displayOn=켜짐
- display.display() 수신 시 플레이스홀더 숨김·캔버스 표시
- display off(0xAE) 시 플레이스홀더 복원

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:25:23 +09:00
kimandClaude Fable 5 2c0cf8cdcd Arduino 에뮬레이터: TWI/I2C 버그 수정 — SSD1306/LCD 실제 동작
avr8js TWI API는 리턴값이 아니라 twi.completeXxx() 호출로
상태머신을 전진시키는 구조임. 기존 코드는 start()에서
completeStart()를 호출하지 않아 Wire.endTransmission()에서
영원히 대기하던 버그 수정.

- start()    → twi.completeStart()
- stop()     → twi.completeStop()
- connectToSlave() → twi.completeConnect(ack)
- writeByte() → twi.completeWrite(true)
- readByte()  → twi.completeRead(0xFF)

검증: SSD1306 "Hello!" 스케치 — 0.06s sim 만에 setup() 완료,
GDDRAM 1024바이트 전체 쓰기, 캔버스에 텍스트/그래픽 정상 렌더링.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:07:28 +09:00
kimandClaude Fable 5 3d62dc796e Arduino 에뮬레이터: SSD1306 OLED(128×64) I2C 에뮬레이션 추가
- AVRTWI connectToSlave에서 LCD(0x27/0x3F)와 OLED(0x3C/0x3D) 동시 지원
- SSD1306 프로토콜 파서:
  - control byte (0x00=cmd stream, 0x40=data stream)
  - 주요 명령: addressing mode, set col/page addr, display on/off,
    inverse, page/col low/high nibble, 2바이트 명령 처리
  - horizontal/vertical/page 어드레싱 모드 모두 지원
- GDDRAM(128×8 pages) 유지 → canvas 128×64 px 렌더링
  (픽셀 2× 스케일, 청백색 톤)
- displayOn 명령 수신 시 OLED 패널 자동 표시
- runFrame마다 dirty 플래그로 효율적 canvas flush

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:58:08 +09:00
kimandClaude Fable 5 cd999dcd12 Arduino 에뮬레이터: 라이브러리 관리 UI + LCD(HD44780) I2C 에뮬레이션
라이브러리 관리:
- GET/POST/DELETE /api/arduino/libs(/search/install/uninstall) 엔드포인트
- 에뮬레이터 헤더 '라이브러리' 버튼 → 설치됨/검색 탭 모달
  (설치·삭제, 검색 결과 20개, 상태 피드백)

LCD 에뮬레이션 (AVRTWI 기반):
- avr8js AVRTWI로 I2C 버스 인터셉트
- PCF8574 바이트 → HD44780 nibble 디코딩
- DDRAM/CGRAM 상태 유지, Clear/Home/SetAddr/EntryMode 명령 처리
- 보드 패널에 가상 16×2 LCD 렌더링 (백라이트 온/오프 표시)
- I2C 주소 0x27, 0x3F 모두 지원

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:54:29 +09:00
kimandClaude Fable 5 fae47a0962 Code editor: Arduino 에뮬레이터(avr8js) + ESP32 Web Serial 플래셔
- web-ui/arduino-emulator.html: avr8js 기반 ATmega328P 에뮬레이터
  (핀 상태 패널, 보드 LED, 시리얼 모니터, 속도 조절)
  - cpu.tick() 누락 수정: delay()/millis()/Serial 동작 안 하던 버그
  - 시리얼 라인 추적(serialLineSpan): D13 sys 메시지 끼어들 때 줄 깨짐 수정
- web-ui/esp32-flasher.html: Web Serial로 merged.bin 플래시
- POST /api/arduino/compile: arduino-cli로 uno/nano hex, esp32 merged.bin 컴파일
- POST /api/code/round: 클라이언트 주도 코드 에디터용 1라운드 SSE 엔드포인트
- code.js: 실행 모드에 Arduino 에뮬레이터 / ESP32 플래시 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:24:45 +09:00
kimandClaude Sonnet 4.6 f00c453de9 Code editor layout: Karpathy toggle, CSS grid layout, AI panel fixes
- 🧠 Karpathy 코딩 가이드라인 토글 버튼 추가 (시스템 프롬프트 주입)
- 모델 셀렉터를 AI 패널 헤더 내부로 이동 (채팅창 너비 연동)
- CSS Grid 레이아웃으로 전환: AI 패널이 파일 탭 상단까지 연장
- 오른쪽 공백 수정: auto 컬럼 → CSS 변수(--ai-panel-w) 제어
- 입력창 소실 수정: #code-ai-panel에 overflow:hidden 추가
- 터미널 불작동 수정: .code-bottom-panels overflow:hidden 제거
- body padding/gap 초기화로 전체 여백 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 15:10:59 +09:00
kimandClaude Sonnet 4.6 158a156746 Release 2.10.0: 코드 에디터 터미널 초기화 버그 수정 + cls/clear 자동 실행
- requestAnimationFrame → setTimeout(60ms): 패널 레이아웃 계산 후 xterm 초기화
- ptyReady 스냅샷 버그 수정: codeTermShells 대신 xtermInstances 참조
- 터미널 열릴 때 cls/clear 자동 실행 (Windows: cls, Linux: clear)
- companionPlatform 타이밍 버그 수정: clearCmd를 shell_ready 수신 후 평가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 10:23:19 +09:00
kimandClaude Sonnet 4.6 9b558be9f4 Code editor: block flip-flop colors, view option buttons, terminal error improvements, live server log bubble
- Add alternating block background colors (ff-block-even/odd) for functions/classes
- Add ¶빈줄숨김 / ▓블록색상 toggle buttons to file panel sidebar (below file tree)
- Fix terminal error send: filter Windows prompt+command lines, only send last Traceback block, strip pygame header noise
- Show live server log bubble during AI tool calls, fade out on completion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 13:57:27 +09:00
kimandClaude Sonnet 4.6 4ead0750b9 Code editor UI: per-file streaming bubbles, options UI, terminal error button, model card
- Per-file streaming: text shows while AI works, collapses on tool call, ✅완료 at end
- Options UI: numbered choice buttons with number/keyword input selection
- Number input in chat (1~6) selects corresponding option chip
- Terminal error 🤖 button permanently visible in header bar
- Model card moved to tabs bar top-right, synced with panel width
- Removed 코드 저장 디렉토리 from settings; merged save/folder into sidebar
- Removed language selector from chat header
- Bottom cards anchored to sidebar bottom
- Simplified planInstruction prompt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:14:00 +09:00
kimandClaude Sonnet 4.6 ac518bc2a5 Remove AgentBuilder, add file ops UI, unify code editor prompt routing
- Delete agent-builder-integration.ts, workflow-store.ts, prompts.ts (~1400줄)
- Add move_file tool + sidebar file ops (right-click menu, inline rename, drag-drop, new folder)
- Loop detection: read-only tools block at 2 repeats; planText capped at 12000 chars (fix 413)
- Route proj-gen-*/proj-plan-* to handleCodeChat; remove duplicate codeAiSystemPrompt from handleChat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 17:12:30 +09:00
kimandClaude Sonnet 4.6 508d11615a Add user workspaces, dental DB scripts, server memory + code editor improvements
- cherry: orofacial/TMD PPTX presentations + 음악가 구강건강 가이드
- papa: sinus/infraoccluded PPTX, garden-monitor Arduino, MIDI files
- databases: PCSP scraper, translation scripts, vision benchmark, batch JSONs
- web-ui: code.js/companion.py/styles.css major updates, autostart installer
- src: ollama-client, session, LLMProvider, ollama-adapter patches
- .gitignore: add claude-key, SQLite WAL/SHM, __pycache__, nohup.out

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 23:13:03 +09:00
kimandClaude Sonnet 4.6 43942d4b2c Refactor code editor out of main UI + PubMed FTP PDF + login token fix
- Move code editor to standalone page; remove from main index/app mode switcher
- Add diff-active tab highlight and diff bar CSS to styles
- Add markdown table styles for chat messages
- PubMed: try NCBI FTP link before Unpaywall for PDF download
- Login: also persist token to localStorage for cross-tab auth
- Update skills state and config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 15:28:03 +09:00
kimandClaude Sonnet 4.6 868e63bd70 Read num_ctx from Ollama manifest params blob for accurate context window
/api/show가 cloud 모델의 PARAMETER num_ctx를 반환 안 하는 문제 해결.
매니페스트 → params 레이어 블롭 직접 파싱해서 num_ctx 우선 사용.
kimi-k2.6:cloud 1M으로 Modelfile 수정 후 정확히 표시됨.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 15:08:46 +09:00
kimandClaude Sonnet 4.6 a3c4156198 Auto-match num_ctx to model's native context_length via /api/show
chat, generate, chatStream 모두 /api/show에서 읽은 context_length를
num_ctx 기본값으로 사용. 결과는 모델별로 캐시됨.
엔드포인트 변경 시 캐시 자동 무효화.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 15:00:34 +09:00
kimandClaude Sonnet 4.6 512528a9e6 Remove hardcoded ctx table: use Ollama /api/show directly for all models
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:53:48 +09:00
kimandClaude Sonnet 4.6 33a555052d Fix model-context endpoint: remove undefined requireAuth, add known ctx table
requireAuth 미사용 함수 제거 (글로벌 미들웨어가 처리).
kimi-k2 → 1M, gemini → 1M, deepseek → 128k 하드코딩 테이블 추가.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:52:24 +09:00
kimandClaude Sonnet 4.6 d58b8b4d32 Fix session bar colors: use CSS variables instead of hardcoded hex
다크/라이트 테마 모두 var(--text), var(--muted), var(--line-strong) 사용.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:47:49 +09:00
kimandClaude Sonnet 4.6 1a4f77f811 Show context bar always (not only when history exists)
히스토리 없어도 '0 / 200k' 형태로 항상 표시 → 클릭으로 최대값 재확인 가능.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:46:20 +09:00
kimandClaude Sonnet 4.6 06d39fd09d Improve session bar visibility: larger text, cleaner button, fix ctx display bug
font-size 10→12px, 버튼 배경색·테두리 뚜렷하게, ctx-wrap display:none 이중 선언 버그 수정.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:44:16 +09:00
kimandClaude Sonnet 4.6 eb203a45f9 Make context bar clickable to re-fetch model context window
클릭하면 캐시 초기화 후 서버에서 최대값 재확인.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:39:58 +09:00
kimandClaude Sonnet 4.6 753adec64d Fetch real model context window from server for session bar
GET /api/model-context?model=<name> 엔드포인트 추가.
Claude → 200k 고정, Ollama → /api/show 쿼리 후 model_info 또는
num_ctx 파라미터에서 실제 컨텍스트 크기 추출.
클라이언트: 모델 변경 및 초기 부팅 시 자동 fetch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:38:11 +09:00
kimandClaude Sonnet 4.6 1350ece55a Add context usage indicator to code editor session bar
세션 바에 현재 컨텍스트 토큰 추정치 / 모델 최대값 표시.
글자 수 ÷ 4 로 토큰 추정, 50% 이하 초록 / 50~80% 노랑 / 80%+ 빨강 색상 진행 바.
메시지 전송·응답 완료 시 즉시 업데이트.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:33:54 +09:00
kimandClaude Sonnet 4.6 d612b32d2e Fix multi-file diff: auto-advance to next pending diff after accept
여러 파일 편집 시 첫 번째 diff 수락 후 다음 파일로 자동 이동.
diff 바에 남은 파일 수 표시 (예: "2개 파일 남음").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:22:05 +09:00
kimandClaude Sonnet 4.6 2f07dbf1fa Release 2.9.9: 오케스트레이터 버그 수정 + 로컬 터미널 프로젝트 동기화
- 오케스트레이터 auto-trigger 경로에 !isCodeAiSession/!isProjSession 누락 수정
  (code_ai_ 세션에서 tool failure 쌓이면 memory_read 등 엉뚱한 도구 호출로 멈추던 문제)
- 로컬 셸 시작/프로젝트 전환 시 프로젝트 폴더로 자동 cd
- companion.py: shell_ready에 platform/home 정보 포함
- Windows/Unix 경로 처리: cd /d "경로" vs cd "경로"
- localTermPath 미설정 시 companionHome fallback, 둘 다 없으면 cd 안 함

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 13:52:37 +09:00
kimandClaude Sonnet 4.6 3bebb4efc5 Fix local shell: fit before sending shell request to companion
터미널 패널이 닫힌 상태에서 로컬 셸을 열면 레이아웃 계산 전에
fitAddon.fit()이 실행돼 rows=0/cols=0으로 companion에 전달됨.
300ms 타임아웃 안에서 fit을 재실행하고 최솟값(24x80) 보장.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 13:24:38 +09:00
kimandClaude Sonnet 4.6 7c6a73512a Release 2.9.8: 코드 에디터 로컬 모드 개선 + 프로젝트 마법사 리팩토링
- 로컬 모드 shell 차단: error:true로 변경, 시스템 프롬프트에 명시적 금지 문구 추가
- 로컬 모드 파일 자동 저장: 새 파일 생성 시 승인 팝업 없이 즉시 디스크 저장 + "💾 저장" 알림
- 계획 단계 프롬프트 강화: 파일별 주요 함수/로직/데이터흐름/주의사항 포함
- 프로젝트 마법사 디폴트화: 새 세션 생성 시 자동으로 계획 단계 진입
- _isNewProjectIntent / _isSingleFileIntent 제거: 수동 프로젝트 생성으로 대체
- 채팅 히스토리 버그 수정: codeAiClear에서 history 지우기 전 saveProjectSession 호출
- 초기 로드 버그 수정: restoreLocalDirHandle에서 채팅 패널 렌더링 누락 수정

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 12:43:43 +09:00
kimandClaude Sonnet 4.6 027ba8725e Release 2.9.7: 코드 에디터 로컬 파일시스템 + 프로젝트 생성 개선
- 코드 에디터 저장: 서버 API → File System Access API로 전환
  - codeSaveFileById에 저장 성공/실패/폴더미선택 피드백 메시지 추가
- 프로젝트 생성 형식: project-files JSON → @@FILE/@@ENDFILE 델리미터로 변경
  - JSON 이스케이프 오류(Unterminated string) 근본 해결
- 계획 단계 시스템 프롬프트 강화: JSON 출력 절대 금지 명시
- 프로젝트 생성 세션 ID: 계획 세션 재사용 (서버가 history 파라미터 무시하므로)
- _projFileCreated async화: 파일 쓰기 완료 후 사이드바 리프레시
- 헤더/드롭다운 폴더명 표시 동적 업데이트 (workspace/code/ 하드코딩 제거)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 18:08:45 +09:00
kimandClaude Sonnet 4.6 613690da55 Release 2.9.6: PPTX wizard search + image extraction improvements
- Add Europe PMC search source (free API, life sciences, PMC full-text)
- Fix Europe PMC field mapping: journalInfo.journal.title, firstPublicationDate
- Add PMC-only filter button with live paper count
- Move sort selector to search row; shrink year input (flex:none, no spinners)
- Uniform source checkbox sizing with per-source accent colors
- Exclude preview/ directory from image grid (project-images endpoint)
- Numeric sort for project images (slide1→2→9→10→11)
- Skip PDF figure re-extraction if figure_* files already exist (pdf-extract.ts)
- Preserve img:done state across wizard prep re-runs (savedImgDone)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 14:30:16 +09:00
kimandClaude Sonnet 4.6 b292061c71 Release 2.9.5: PPTX wizard improvements + PDF extraction fixes
- PDF: skip references/bibliography section from text extraction
- PDF: add minimal system prompt for translate sessions (translation-only, no tool calls)
- Wizard: image download button per card + bulk download all
- Wizard: translation modal download button (saves as _ko.txt / _en.txt)
- Wizard: save papers.json immediately on upload, after text extraction, and before outline step
- Wizard: short image directory names (22 chars + timestamp suffix)
- Wizard: project-images scans workspace root dir alongside pptx/ folder
- Server: pptx/list scans only pptx/ folder (workspace root scanning removed after file migration)
- create_presentation: save output to workspace/pptx/{slug}/ instead of workspace root
- edit_presentation: fuzzy path search includes pptx/ subfolder

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 23:10:40 +09:00
kimandClaude Sonnet 4.6 bba06bab6f Fix wizard re-run: skip existing PDF/text, preserve state across restarts
Server:
- download-pdf-stream: check if PDF already exists (size > 1KB) → return
  cached path immediately, skip all network requests

Client (startPrep):
- save pdfPaths from prepLog before reset → skip PMC download if path known
- skip text extraction if paperTexts[key] already loaded in memory
- text from project open (onOpenProjChange) now survives "다시 실행"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 15:15:08 +09:00
kimandClaude Sonnet 4.6 557e328610 Integrate mistral vision analysis into PDF figure extraction flow
- Image extraction now immediately followed by per-figure mistral analysis
  no manual button click needed: extract → analyze runs as one atomic flow
- Progress shows "이미지 분석 1/5..." inline with prep step
- Captions + 제외 filtering available before outline generation
- "🔍 재분석" button retained for manual uploads / re-run on failures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 15:04:47 +09:00
kimandClaude Sonnet 4.6 0391e7d2cf Fix wizard translations: force mistral for all translation/outline calls
gpt-oss:120b-cloud refuses even short medical texts with "텍스트가 너무 길어...".
Add model:'mistral-large-3:675b-cloud' explicitly to three wizard /api/chat calls:
- translateAbstract() — abstract Korean translation
- chatStream() — PDF text chunk translation (used by translatePdfText)
- generateOutline() — slide outline generation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 15:03:08 +09:00
kimandClaude Sonnet 4.6 edf2c39472 Release 2.9.4: PPTX wizard figure analysis + skill model trigger fix
- pptx-wizard: add "🔍 이미지 분석" button in Step 2 image panel
  * calls /api/pptx/analyze-image per figure via mistral vision
  * shows per-image progress (1/10, 2/10...)
  * "제외" caption → dimmed card + filtered from outline prompt
  * captions shown below each thumbnail in the grid
- server: POST /api/pptx/analyze-image endpoint
  * resolves /api/files/ path to workspace file, thumbnails if >300KB
  * calls orchestration.secondary vision model (mistral-large-3:675b-cloud)
  * caches results in project/.image-captions.json (skips on re-analysis)
- pptx-wizard: generateOutline() includes captions in imgList
  * "제외" images filtered out before sending to LLM
  * format: "/api/files/... (figure_p2_1) — 카플란-마이어 생존곡선 3그룹"
- skills-manager: fix getModelOverrideForUser() trigger filtering
  * was returning skill model for ALL messages regardless of trigger keywords
  * now only overrides when message matches skill triggers (same logic as buildPromptContext)
  * presenter model (mistral) now only applies for 발표/pptx/슬라이드 keywords

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 14:58:22 +09:00
kimandClaude Sonnet 4.6 69734e2e58 Release 2.9.3: switch primary to gpt-oss:120b-cloud with mistral vision fallback
- config: primary model → gpt-oss:120b-cloud (faster general chat, 2.72s median)
- server-v2: fix vision regex to exclude gpt-oss (gpt(?!-oss) negative lookahead)
  * gpt-oss was incorrectly matching /gpt/ → image data sent to non-vision model
  * applied at all 3 _supportsVision check sites (lines 5204, 6362, 7832)
- server-v2: vision fallback routing — when primary lacks vision support and user
  message contains images, automatically route to orchestration.secondary
  (mistral-large-3:675b-cloud, 4.27s avg, fastest vision cloud model)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 14:38:15 +09:00
kimandClaude Sonnet 4.6 70fc406b2a Release 2.9.2: trigger-based skill injection + vision support for all adapters
- skills-manager: conditional skill injection via triggers frontmatter field
  (skills only sent to model when message matches trigger keywords)
- skills: added triggers to all skill SKILL.md files; cleaned up headers/disclaimers
- anthropic-adapter: toAnthropicContent() converts OpenAI image_url → Anthropic image blocks
- multi-agent: vision flag in SecondaryProfile; secondarySupportsVision() checks config
- config: secondary set to mistral-large-3:675b-cloud with vision:true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 14:28:40 +09:00
kimandClaude Sonnet 4.6 d9df800524 Release 2.9.1: PPTX wizard project persistence + PDF column extraction
- PDF: PyMuPDF 2-column aware extraction (left col → right col, drop cap merge,
  header/footer/footnote removal), reference stripping, 200k char limit
- Wizard: chunked parallel translation (15k chars/chunk, ~4x faster)
- Wizard: save UPL_ (upload) papers to papers.json (were silently skipped)
- Wizard: restore UPL_ papers from manifest with _isUpload/_localPdf fields
- Wizard: project-papers endpoint correctly resolves UPL_ ko.txt in project dir
- Wizard: images loaded on manifest restore (renderImgGrid unconditional)
- Wizard: outline.json auto-save after generation and slide edits
- Wizard: outline.json fallback load when no PPTX exists
- Wizard: loadProjList() refresh after savePapersToProject()
- Code editor: default font size 14→12px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 23:29:54 +09:00
kimandClaude Opus 4.8 6963ccb9a0 Release 2.9.0: open code editor in a standalone browser tab
The 💻 코드 sidebar tab now opens a dedicated code.html page in a new tab,
mirroring how the slide wizard opens pptx-wizard.html.

- Add web-ui/code.html: standalone code editor page reusing styles.css and
  the same CodeMirror/xterm/Monaco head as the main app.
- Add web-ui/code.js: self-contained code-view logic — inlined shared helpers
  (api/authHeaders/escHtml/getCookie) + the extracted code-editor block +
  a bootstrap that inits Monaco and loads models/dir. It mirrors the code
  block in app.js (kept duplicated so the main app stays untouched).
- index.html: tab-code now window.open('/code.html'). The in-page code mode
  (top mode button) is unchanged, so chat→editor live streaming still works.

Verified with Playwright: Monaco initializes, editor/sidebar/toolbar/Coder AI
render, no JS errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:07:22 +09:00
kimandClaude Opus 4.8 949a910ad6 Release 2.8.2: render title-slide photo background in PPTX
The slide editor draws a title slide's image as a full-bleed darkened
background, but pptx_gen.py's make_title_slide ignored image_path entirely
and only drew the skin background — so photo backgrounds showed in the
editor but vanished from the generated PPTX / preview.

- make_title_slide now renders image_path full-bleed (cover) with a dark
  overlay and white title/subtitle, matching the editor preview.
- Add set_shape_fill_opacity() that injects OOXML <a:alpha>, since
  python-pptx's fill.transparency is a silent no-op (the overlay was
  rendering as fully opaque black). Apply it to the fullscreen bottom bar too.
- Pass project_dir/workspace_path/warnings into make_title_slide.
- Bump version to 2.8.2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 20:42:25 +09:00
kimandClaude Opus 4.8 957a13f98c Release 2.8.1: pptx-wizard slide editor + fixes
- Fix pptx-wizard slide editor modal opening off-screen (header clipped)
  when a saved drag position is restored on a fresh page load: clear the
  CSS centering transform and clamp coordinates into the viewport.
- Add pptx-wizard.html and python-runner.html web UIs.
- Bump version to 2.8.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 20:14:01 +09:00
kimandClaude Sonnet 4.6 22bfc3ac27 Separate skills state completely per user
- All skill toggles are now per-user (except multi-agent-orchestrator
  which remains global). Admin toggle without a target username defaults
  to their own per-user state instead of the global file.
- GET /api/skills defaults to the requesting user's own state (previously
  returned global state when no ?username= param was given).
- Add SkillsManager.initUserSkillsState(): creates per-user
  skills_state.json from global defaults if missing — called on user
  creation and on every login as a safety net for existing accounts.
- Create initial per-user skills_state.json for cherry and jasmine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 17:33:29 +09:00
kimandClaude Sonnet 4.6 2d3e33b6b3 Centralize all path management via src/config/paths.ts
- Add getPaths() with workspace, scripts, ppt skin/template paths
- Export getWorkspacePath(args?) helper — removes duplicate local functions
  and stale process.cwd()/workspace fallbacks from sqlite, pdf, excel,
  image, pubmed, email, audio-transcribe (7 files)
- weather.ts: replace __dirname-relative scripts path with getPaths().scripts
- Move ppt/ to .smallclaw/skills/presenter/ppt/; update server-v2.ts,
  pptx.ts, pptx_gen.py (argparse --skin-dir/--template-dir)
- Fix PPT skin thumbnail serving: res.sendFile → fs.createReadStream
  (bypasses send module dotfiles restriction for .smallclaw/ paths)
- Fix workspace default: .smallclaw/workspace (was project root workspace/)
- Fix subagent paths to use SMALLCLAW_DATA_DIR env var
- Fix Monaco marked module load failure: restore define.amd on
  DOMContentLoaded after deferred UMD libs (tone, magenta) have loaded
- Add AudioContext resume on first user click (Chrome autoplay policy)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 16:55:14 +09:00
kimandClaude Sonnet 4.6 5608b83850 Refactor project layout and fix workspace/subagent paths
- Remove global workspace (workspace/) — all data migrated to .smallclaw/
- Move ppt/ skins & templates to .smallclaw/skills/presenter/ppt/
- Add .smallclaw/templates/ for user bootstrap files
- Move dental_images to .smallclaw/databases/, update 1,485 DB entries
- Fix subagent store paths to use SMALLCLAW_DATA_DIR instead of workspace.path
- Per-user Telegram bots: MultiUserTelegramManager, vault-stored tokens
- Fix Telegram token persistence (vault fallback, strip from config.json)
- Fix session migration: delete global originals even when skipping
- Delete unused root images, MD docs, tests/, smallclawworkspace/ artifacts
- Add meteorologist skill, counselor skill, presenter skill scaffold
- Strip workspace.path from config.json (was causing path confusion)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 15:21:21 +09:00
kimandClaude Sonnet 4.6 d7eb0abc6d Add meteorologist skill with 9 weather/climate tools
New skill:
- .smallclaw/skills/meteorologist/SKILL.md — 기상 전문가 스킬 (Windy iframe 규칙 포함)

New weather tools (src/tools/weather.ts):
- weather_airpollution: OpenWeather 대기질 (AQI, PM2.5/PM10/O3/NO2)
- weather_openmeteo: Open-Meteo 시간별 예보 (ECMWF/GFS, 키 불필요)
- weather_kma: 기상청 공식 API (초단기실황·단기예보)
- weather_airkorea: 에어코리아 실시간 대기질
- weather_nasa_power: NASA POWER 기후 데이터 (MERRA-2, 키 불필요)
- weather_era5: ERA5 재분석 과거 데이터 (Open-Meteo Historical, 키 불필요)
- weather_cds: Copernicus CDS 정식 API (ERA5·CMIP6 SSP 시나리오)
- weather_cmip6: CMIP6 기후 모델 (Open-Meteo Climate API, 키 불필요)

Scripts:
- scripts/era5_cds_fetch.py — CDS/CMIP6 Python 헬퍼 (ZIP→NetCDF 처리 포함)

web-ui:
- Windy URL → iframe 자동 렌더링 (standalone URL + 마크다운 링크 모두 감지)
- windyToEmbedUrl: windy.com comma 형식 URL 파싱 개선

server-v2.ts:
- BROWSER RULE: "열어줘" 제거 → 오용 방지
- weather context: 9개 도구 선택 기준 추가
- JSON schema 8개 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 14:22:49 +09:00
kimandClaude Opus 4.7 ed25f457df Update skills_state: lawyer/investor disabled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 20:22:29 +09:00
kimandClaude Opus 4.7 8b0f47eba0 Restore musician and accountant skills
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 20:13:53 +09:00
kimandClaude Opus 4.7 2485cea650 Restore psychiatrist skill — has unique value (crisis protocol, DSM-5 guidance)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 15:30:14 +09:00
kimandClaude Opus 4.7 0020109a69 Remove skills with no unique tools (musician, accountant, psychiatrist)
These skills only added prompt instructions — no gateway tools or
unique capabilities. The system prompt already covers their domains.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 15:14:46 +09:00
kimandClaude Opus 4.7 7a9826f20a Fix dental-dict images, remove coder skill and image stripping regex
- Remove blanket regex that stripped ALL image markdown from AI responses,
  which was breaking dental-dict images. The [IMAGE COMPLETE] prompt reminder
  already tells the model not to duplicate image_edit/image_read results.
- Remove coder skill (SKILL.md)
- Remove dental-dict skill (now handled by MCP server description alone)
- Remove broken external URL for 볼튼분석 (Open-i link dead)
- investor skill enabled in skills_state

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 15:07:58 +09:00
kimandClaude Opus 4.7 347bab27b3 v2.9.1 — Config centralization, settings route extraction, web-ui split
- tools/*.ts: Replace fs.readFileSync config reads with getConfig() + resolveSecret()
  (pubmed, legal, scholar, weather, email, web, files — 7 files)
- tools: Remove direct getVault() calls in email.ts and weather.ts, use resolveSecret()
- gateway: Extract 21 /api/settings/* routes from server-v2.ts into routes/settings.ts
  (server-v2.ts reduced by ~375 lines)
- types: Add missing config fields (legal, semantic_scholar, openweather, weather, email, search.pubmed_api_key)
- web-ui: Split index.html (13,879 lines) into index.html (1,934) + styles.css (2,530) + app.js (9,416)
- web-ui: Allow static assets to bypass auth middleware
- Remove empty index2.html template stub

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 19:26:23 +09:00
kimandClaude Sonnet 4.6 8aee152f2f v2.9.0 — Settings overhaul, Mistral parallel tool fix, Anthropic provider
- Fix settings save bug: primaryModel captured before _modelSettingsLoaded guard → wiped model roles when models tab not opened
- Fix server: filter empty-string roles before saving to prevent role wipe
- Add Voice and Session settings tabs to UI
- Add OpenWeather API key field to Credentials tab
- Add GET/POST endpoints: /api/settings/voice, /api/settings/session, /api/settings/openweather
- Fix Mistral parallel tool calls: model embeds tool calls as text instead of tool_calls array; parseEmbeddedToolCalls() detects and converts
- Add Anthropic provider adapter (anthropic-adapter.ts)
- Weather tool vault key resolution fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:52:40 +09:00
kimandClaude Sonnet 4.6 eaf6678a21 v2.8.0 — Code editor tab + context panel improvements
- Add 💻 코드 nav button; code mode shows aside + right-panel
- Code mode left sidebar: 파일/모델/설정 tabs (file tree, model selector, Monaco settings)
- Monaco editor settings restored from localStorage on init
- Server log panel: collapsible (▾ toggle), height fixed to 50% of aside
- Context panel compact layout: reduced padding/margins/min-heights throughout so all sections (시스템통계/에이전트컨텍스트/빠른작업/프로세스로그) fit without scrolling
- POST /api/code/save, GET /api/code/files, GET /api/code/file, DELETE /api/code/file endpoints
- Coder AI: glm-5.1:cloud default, auto-open generated code in Monaco tabs
- Code folder browser with fixed-position dropdown (escape overflow clip)
- Code editor terminal panel with PTY/xterm.js (Ctrl+` shortcut)
- Remove canvas panel; restore chat terminal infrastructure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:20:16 +09:00
kimandClaude Sonnet 4.6 7ebf8cf86f Add VS Code-style code editor tab with AI chat panel
사이드바에 💻 코드 탭 추가:
- Monaco Editor (vs-dark/light 테마 자동 연동)
- 파일 탭 관리 (새 파일, 전환, 닫기), Ctrl+S 저장
- 오른쪽 AI 채팅 패널 (Coder 세션, SSE 스트리밍)
- "선택 코드 → AI 전송" 버튼
- "▶ 실행" → 하단 터미널 패널로 명령 전송
- 에디터/AI 패널 수직 드래그 리사이즈
- 스킬 탭 이모지 버그 수정 (조건 반전, 커스텀 이모지 표시 안 되던 문제)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 00:20:30 +09:00
kimandClaude Sonnet 4.6 7dac40381e Add Coder skill (fullstack dev expert)
풀스택 시니어 엔지니어 어시스턴트:
- 도구: python_eval, bash_eval, file_read/write, web_search
- 코드 실행 후 결과 검증 원칙
- 공식 문서 우선 참조 사이트 (MDN, PyPI, React, FastAPI 등)
- 코드 리뷰 체크리스트 (보안→정확성→성능→가독성)
- Python/JS/백엔드/DB/DevOps 언어별 핵심 포인트
- skills_state.json에 coder: true 등록

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 00:06:42 +09:00
kimandClaude Sonnet 4.6 9fca14e8db Add chat inline terminal panel (xterm.js + PTY)
채팅 입력창 옆 ⌨ 버튼으로 슬라이드업 터미널 패널 토글.
- 상단 드래그 핸들로 높이 조절 (120px~70vh)
- + 버튼으로 bash 탭 추가, × 로 탭 닫기
- 기존 xterm.js / PTY WebSocket 인프라 재사용

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 23:44:14 +09:00
kimandClaude Sonnet 4.6 6df1bcf5b3 Add TradingView chart widget + MIDI/tab close fixes
- investor skill: TradingView 실시간 주가 차트 렌더링 지원
  - ```tradingview SYMBOL|INTERVAL``` 블록 → 차트 위젯 자동 생성
  - JSON 형식 출력 시 HTML 언이스케이프 후 파싱 (symbol/interval 추출)
  - renderTVChart(): tv.js 동적 로드, 다크/라이트 테마 연동, RSI·MACD 기본 포함
- musician skill: MIDI 다운로드 사이트 4개 추가 (freemidi, bitmidi, piano-midi, midiworld)
- MIDI 탭 닫기 버그: window.open에 noopener,noreferrer 추가
- beforeunload/pagehide 시 midiRouter.stop() 호출

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 23:26:28 +09:00
kimandClaude Sonnet 4.6 00d508cc77 MIDI upload flow: save to workspace, action picker (재생/편집/악보)
- music-renderer: saveMidiFile export (JSON, no LilyPond), getRenderFile prefers original.midi, fix self-copy bug
- server-v2: POST /api/music/midi now saves to workspace/music/<name>/ and returns JSON immediately; new SSE endpoint /api/music/midi-score for on-demand LilyPond
- index.html: buildMidiPickerWidget with color-coded buttons (green/purple/amber), MIDI download moved inside player tab, score panel default closed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:29:49 +09:00
kimandClaude Sonnet 4.6 1bfadd6060 Add MIDI editor + fix external synth instrument mapping
- web-ui/midi-editor.html: full piano roll MIDI editor (new tab)
  - all tracks simultaneously, color-coded per channel
  - note add/delete/move/resize, multi-select, copy/paste
  - velocity lane, track panel (mute/solo/instrument), undo/redo
  - GM reset + bank select on playback, MIDI output device select
  - export to .mid, open via ?url= param or file picker

- web-ui/index.html: add ✏ 편집 button to MIDI widget (opens editor)
  - GM SysEx reset + bank select before note playback
  - 200ms note delay for synth init time
  - getRenderFile: prefer original.midi over LilyPond output.midi

- src/gateway/music-renderer.ts: getRenderFile returns original.midi first
  - LilyPond SVG render overwrites output.midi (no Program Changes)
  - original.midi preserved from upload, served via /api/music/file/:id/midi

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 13:54:15 +09:00
kimandClaude Sonnet 4.6 bc9fb4043b Improve session management: token-based history, boot session cleanup, telegram user mapping
- session.ts: Replace fixed maxMessages limit with token-based trimHistory;
  resolveNumCtx() now queries Ollama API for actual model context length (cached).
  maxMessages raised to 2000 as safety ceiling only.
- session.ts: Boot sessions (boot-*) never saved to disk — ephemeral by design.
- session.ts: New sessions not written to disk until first message is added.
- session.ts: Add cleanupEmptySessions() called at startup to auto-remove empty files.
- session.ts: migrateGlobalSessionsToUser() deletes global original after copying to user dir.
- server-v2.ts: Call cleanupEmptySessions() at startup.
- server-v2.ts: User creation API accepts optional telegramId for immediate channel mapping.
- config.json: Remove explicit maxMessages (now uses dynamic token-based default).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 11:03:53 +09:00
kimandClaude Sonnet 4.6 15650e5798 Switch TTS to edge-tts (ko-KR-SunHiNeural), add TTS toggle + mic auto-send
- Replace piper TTS with edge-tts (Microsoft neural Korean voice)
  - piper ko_KR-kss-medium uses pygoruut phoneme type unsupported by C++ binary,
    causing Chinese-sounding output; edge-tts solves this via online neural TTS
  - Added src/tools/edge_tts_synth.py Python helper script
  - Server TTS endpoint now dispatches by provider (edge_tts vs piper)
  - Config updated: voice.tts.provider = "edge_tts", voice = "ko-KR-SunHiNeural"
- Add TTS toggle switch to web UI (chat input bar)
  - Toggles visibility of all 🔊 buttons and stops active playback
  - State persisted in localStorage (default: on)
- Mic input now auto-submits after speech recognition completes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 21:06:10 +09:00
kimandClaude Sonnet 4.6 cd48a8ebe0 Fix voice: Web Speech API for STT, WAV for TTS
- STT: Replace MediaRecorder+Whisper with browser Web Speech API (ko-KR)
  Whisper base model hallucinated English for Korean speech; Chrome's
  built-in Google STT is far more accurate for Korean
- TTS: Skip ffmpeg OGG conversion, return WAV directly from Piper
  Avoids OGG/Opus codec compatibility issues in browsers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 18:15:41 +09:00
kimandClaude Sonnet 4.6 de18ddc9f6 Add Level 1 push-to-talk voice chat (STT + TTS)
- POST /api/voice/stt: Whisper-cpp transcription of webm/ogg audio
- POST /api/voice/tts: Piper Korean TTS returning ogg audio
- Web UI: 🎤 mic button in chat input; click to start/stop recording
  MediaRecorder → /api/voice/stt → auto-fills chat input
- Web UI: 🔊 TTS button on each AI message; click to play/stop
- config.json: add absolute model/binary paths for whisper-cli and piper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 18:03:55 +09:00
kimandClaude Sonnet 4.6 8d5ff0d785 Add Excel modal resize/drag and pop-out new-window viewer
- Luckysheet modal: 8-direction resize handles (edge + corner), title bar drag-to-move
- First drag/resize converts from flex-centered to absolute positioning
- Minimize/close reset to centered state on reopen
- New xlsx-viewer.html: standalone Luckysheet page for opening xlsx in separate window
- Added "↗ 새 창" button on xlsx cards to open viewer in a resizable popup window
- Viewer shares session cookies so auth works transparently

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 17:18:46 +09:00
kimandClaude Sonnet 4.6 0095381c41 Update config: set cloud models for primary and orchestration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 16:41:12 +09:00
kimandClaude Sonnet 4.6 2be3edc314 Add accountant/investor skills, Excel editor, email attachment fixes
Skills:
- Add accountant (CPA) and investor (CFA) skills with site: hints
- Add site: hints to lawyer, psychiatrist, musician skills
- Allow multiple skills active simultaneously (remove exclusive mode)

Tools:
- Add excel_read / excel_write tools (openpyxl-based)
- Fix python_eval packages: retry with --break-system-packages on PEP 668 failure
- Fix email_read: spaces→underscores in filenames, return /api/files/ links,
  remove absolute savedPaths from data, send SSE 'files' event for attachments

Server:
- FILE_OP v2: fall through to primary when secondary model unavailable
- Add PUT /api/files/{*filePath} endpoint for xlsx editor save

UI:
- xlsx viewer: Luckysheet modal (lazy CDN load, ~3MB on first use)
  with edit mode, 💾 save button, Nanum Gothic font
- Email attachment preview: SSE 'files' event appends file links to final reply
- ✏️ 편집 button (blue) for xlsx cards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 16:38:42 +09:00
kimandClaude Sonnet 4.6 bac5604d5e Add Tesseract OCR fallback to pdf_read
스캔 PDF에서 텍스트 추출 실패 시 자동으로 OCR 실행.
PyMuPDF로 300DPI 이미지 렌더링 후 tesseract kor+eng 적용.
ocr: true 파라미터로 강제 OCR 가능. method 필드로 추출 방법 표시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:04:52 +09:00
kimandClaude Sonnet 4.6 8135477d12 Make skills exclusive: enabling one disables all others
toggle/setEnabled 시 다른 스킬 자동 비활성화.
현재 상태: musician만 활성화.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:48:33 +09:00
kimandClaude Sonnet 4.6 297d4ac166 Strengthen Korean language rule in musician skill
영어 곡 분석 시에도 한국어로만 답변하도록 규칙 강화.
영어 답변 절대 금지 명시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:46:33 +09:00
kimandClaude Sonnet 4.6 e2c6395a9a Hide PDF download button in user messages
사용자가 업로드한 PDF는 이미 갖고 있으므로 저장 버튼 불필요.
renderMarkdown/renderLinkButton에 hideDownload 옵션 추가,
유저 메시지 렌더링 시 적용. 미리보기 버튼은 유지.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:27:39 +09:00
kimandClaude Sonnet 4.6 d1423c9a3b Add image PDF sheet music analysis workflow to musician skill
스캔 악보 PDF 처리 절차 추가:
pdf_read 시도 → 실패 시 pdf_extract_images로 페이지 추출 → image_read로 시각 분석.
도구 목록에 pdf_extract_images, image_read 추가.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:23:48 +09:00
kimandClaude Sonnet 4.6 2e97f6f47c Show active skill names in console log instead of session ID
[v2] ASSISTANT [papa@musician] 형식으로 변경.
스킬 없으면 세션ID 앞 8자리 표시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:19:30 +09:00
kimandClaude Sonnet 4.6 7f053156b8 Fix musician skill: add Korean language instruction
음악 용어가 영어 위주라 영어로 응답하던 문제 수정.
한국어 우선 + 영어 병기 규칙 명시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:06:51 +09:00
kimandClaude Sonnet 4.6 7a5c1e81d8 Add musician skill
범장르 음악 어시스턴트: 작곡·편곡·이론 분석·악기 코칭·음악사.
클래식·재즈·팝·국악 포함, python_eval로 조옮김·코드 계산 지원.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:56:30 +09:00
kimandClaude Sonnet 4.6 81ae83a8fc Track skills directory in git
.gitignore에서 .smallclaw/skills/ 제외 해제.
lawyer, psychiatrist, multi-agent-orchestrator SKILL.md 추가.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:51:14 +09:00
kimandClaude Sonnet 4.6 d93cac545a Add legal research tools and lawyer/psychiatrist skills
- src/tools/legal.ts: korean_law_search (law.go.kr API, 법령+판례),
  korean_law_fetch (전문 조회), us_case_search (CourtListener)
- registry.ts: legal tools 등록, web profile에 포함
- config.json: law.go.kr API 키 추가 (legal.law_go_kr_api_key)
- skills_state.json: lawyer, psychiatrist 스킬 활성화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:49:33 +09:00
kimandClaude Sonnet 4.6 ac678db97b Track heartbeat/skills settings, add vault backup script
Settings that were silently lost on reinstall:
- Track .smallclaw/heartbeat/config.json (active hours 8-22, interval 30m)
- Track .smallclaw/skills_state.json (multi-agent-orchestrator enabled)
- Fix gitignore: heartbeat/ → heartbeat/runs/ (only ignore run logs, not config)
- Fix gitignore: remove skills_state.json from ignored list

Vault (contains channel tokens, passwords) cannot go in git — instead:
- Add scripts/backup-vault.sh: backs up vault+credentials to ~/.smallclaw-backup/
  keeping last 5 snapshots. Run manually or via cron (0 3 * * *).
- Run initial backup now → ~/.smallclaw-backup/vault_20260518_232441

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 23:24:54 +09:00
kimandClaude Sonnet 4.6 4f536861bb Save edited images as PNG by default to prevent JPEG compression buildup
When no explicit output path is given and source is JPEG/WebP, output
defaults to PNG (lossless). This avoids cumulative quality loss on
repeated edits (brightness → contrast → filter → ...).

Exception: 'convert' operation keeps the original format so explicit
format-change requests still work. Explicit output path always honored.

Also fix quality default mismatch: TS params was 85, Python was 92.
Now both are 92 for when JPEG/WebP output is explicitly requested.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 23:09:01 +09:00
kimandClaude Sonnet 4.6 0777409479 Add saturation/blur/filter/vignette/auto_enhance ops, raise JPEG quality
New image_edit operations (pure Pillow, no new deps):
- saturation: color saturation control (value: 0=gray, 1=original, 2=vivid)
- blur: gaussian blur (radius param)
- auto_enhance: one-click auto levels + mild saturation boost
- filter: photo presets — warm, cool, vintage, sepia, fade, dramatic, bw_film
- vignette: edge darkening for portrait look (strength param)

Also raise default JPEG/WebP quality 85 → 92 to reduce compression
artifacts on repeated edits, and update TOOL_BLOCK + schema to include
all new operations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 23:03:28 +09:00
kimandClaude Sonnet 4.6 38fbb03f90 Tighten gitignore, clarify ollama_web_search, add image deps installer
- Add per-user session/workspace paths to .gitignore so runtime data
  (sessions, uploads, memory, attachments, pubmed) is no longer tracked
- Narrow ollama_web_search description to prevent it being chosen over
  web_search for news/info queries — it's now explicitly a fallback only
- Add scripts/install-image-deps.sh to install Pillow/torch/rembg deps
- Remove stray root files (1, pdf-pptx.txt, eng.traineddata)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:23:03 +09:00
kimandClaude Sonnet 4.6 569f563cca Fix Korean web search detection and SearXNG banner, update dental dict
- Add Korean search keywords to WEB category (뉴스, 검색해, etc.) so
  Korean news queries trigger web_search instead of ollama_web_search
- Show ✓ SearXNG in startup banner when searxng_url is configured
- Update dental dict databases scripts and DB
- Clean up stale sessions and workspace runtime files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:18:20 +09:00
kimandClaude Sonnet 4.6 fd79dfea6f Add SearXNG settings.yml to repo (.smallclaw/searxng/)
Copy of /home/kim/searxng/settings.yml for version control.
Disables failing engines (brave, karmasearch, startpage, qwant, yahoo, reuters, wikinews)
and enables working news engines (naver news, hackernews, mojeek news).

Deploy: cp .smallclaw/searxng/settings.yml ~/searxng/ && docker restart searxng

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:05:07 +09:00
kimandClaude Sonnet 4.6 3f9857a639 Track .smallclaw/config.json and add SearXNG search config
- Remove .smallclaw/config.json from .gitignore
- Add search config: preferred_provider=searxng, searxng_url=http://localhost:8888

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:04:32 +09:00
kimandClaude Sonnet 4.6 245606252e v2.7.1 — image edit improvements, search config, bug fixes
image_edit:
- speech_bubble operation with Korean font, rounded rect, tail
- sketch quality: CLAHE pre-processing for better line contrast
- output filename with timestamp to prevent overwrites
- anime/painting stylize timeout 30s→600s (AnimeGANv2 model download)
- remove_bg PNG output fix

server-v2.ts:
- resolveToolImageContent: embed edited image as base64 in tool results
  so vision models can see the output (3 execution paths covered)
- _activeModelName: fix vision support detection for Ollama-hosted models
  (kimi/gemini run via Ollama — provider='ollama' was masking vision capability)
- Synthetic tool call ID generation to prevent Gemini function_response empty name error
- image_edit path hint format changed to English to prevent Gemini hallucination
- userRequestedImageEdit: expanded keyword list (풍선, 달아, 붙여 등)
- image_read OCR failure returns success:true with visual description hint
- TOOL_BLOCKS photo: image_edit workflow documentation updated

web-ui/index.html:
- renderFileDownloads: skip download buttons for image file extensions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:03:32 +09:00
kimandClaude Opus 4.7 34932ac50a Refactor per-user channel registration and improve PDF/PPTX workflows
- Generalize per-user channel registration (telegram/discord/whatsapp)
  via vault instead of config.json userMap
- Add API endpoints for self-service channel binding
- Migrate Telegram channel to use vault-based username resolution
- Improve PDF figure extraction filters (OpenCV)
- Fix PPTX image embedding and font sizing
- Reorder search providers: searxng → ddg priority

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 22:37:56 +09:00
kim e7fd3de974 v2.7.0 2026-05-15 12:13:35 +09:00
kimandClaude Opus 4.7 1b0ac0f605 v2.7.0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 12:12:36 +09:00
kimandClaude Opus 4.7 e11ddd7f3e Refactor dental dictionary into manage.py CLI
Reorganize .smallclaw/databases/ around a single entry point with
subcommands (add-terms / add-images / verify / reassign / stats),
absorb pmc_reassign.py into reassign, and route every image source
through inline vision-model verification before commit.

Layout
  config.py          paths, endpoints, API-key locations (no more
                     hard-coded absolute paths in source files)
  manage.py          argparse dispatcher
  workflow_terms.py  seed-JSON import (JSONC supported, dedupes on
                     korean/english)
  workflow_images.py renamed from dental_image_workflow.py; main()
                     converted to run(verify=True, ...)
  workflow_verify.py validate_image() / verify_db() + verify_updates()
                     gate used by every add-images source
  seeds/             recovered seed_all.json, seed_periodontics.json
  scratch/           ad-hoc work area replacing the /tmp habit
                     (only README.md is tracked)
  docs/howto.md      moved + expanded
  docs/archive_image_rounds/   one-off round scripts + their results
  docs/archive_validation/     model-comparison + validation history

Verification
  - VERIFY_MODEL defaults to qwen3.5:397b-cloud (50-image test on
    procedure-heavy sample: 9.8s/img avg, zero timeouts, Kimi-level
    rigor — see archive_validation/).
  - Prompt strengthened: in-image text/captions are not valid grounds
    for "적합"; technique terms require visible procedure steps, not
    generic device/anatomy photos.
  - All 9 add-images sources gated through verify_updates() before
    commit; --no-verify escape hatch for bulk runs.

.gitignore: API key files, dental_images/, __pycache__/, scratch/*
(README.md kept).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 11:58:53 +09:00
kim ff6627bc25 v2.6.3 2026-05-10 16:32:18 +09:00
kim 930f52ca48 v2.6.2 2026-05-10 12:02:23 +09:00