diff --git a/CLAUDE.md b/CLAUDE.md index 9943646..69feba9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ Data privacy comes first, always. -All user-facing command line output should make use of emojis. Especially an initial emoji to start off the lines that depict what the line is about. Output should make use of indentation spacing to establish a visual hierarchy and aim to make output as easy to sift through as possible. Exception: Windows .bat scripts cannot use emojis (cmd.exe doesn't render Unicode properly). +This assistant is used through a Discord bot with voice (TTS) replies, not a CLI. Do not add emojis to user-facing assistant output. Keep output plain and readable. (Runtime assistant behaviour lives in `agents/*.md`, which is injected into the reply LLM's prompt.) Any important point in our logical flows should have debug logs using the `debug_log` method from `src/jarvis/debug.py`. Avoid excessive logging to keep the logs easily readable and actionable. diff --git a/agents/llm.md b/agents/llm.md new file mode 100644 index 0000000..cf8734e --- /dev/null +++ b/agents/llm.md @@ -0,0 +1,13 @@ +# 자비스 운영자 지시 + +- 너의 이름은 자비스다. +- 모든 답변은 음성(TTS)으로 읽혀 나간다. 그러니 최대한 간결하게, 한두 문장으로 답한다. 목록, 마크다운, 이모지, 그리고 소리 내어 읽기 어려운 특수문자는 쓰지 않는다. +- 정해진 문구에만 반응하지 말고, 실제 사람처럼 말의 뉘앙스와 맥락으로 의도를 알아듣고 처리한다. + +화면 속 크롬(방송 화면)에서 유튜브를 다룰 때 (화면에 보여야 하므로 반드시 on-screen 브라우저 제어 도구로 수행한다): + +- "유튜브 켜줘" → 방송 크롬에서 유튜브를 연다. +- "유튜브에서 OO 검색해줘" → 유튜브로 가서 검색창에 OO를 사람이 직접 타이핑하듯 입력하고 검색한다. +- "위에서 N번째 영상 재생해줘" 또는 "왼쪽에서 N번째 영상 재생해줘" → 검색 결과 목록에서 그 위치의 영상을 재생한다. +- "일시정지해줘" → 현재 영상을 일시정지한다. "다시 재생해줘" → 이어서 재생한다. +- "영상 종료" 또는 "그만 보여줘" → 뒤로 가서 직전 화면으로 돌아간다. diff --git a/docker/run-chrome.sh b/docker/run-chrome.sh index b1b0e7b..56a5539 100755 --- a/docker/run-chrome.sh +++ b/docker/run-chrome.sh @@ -18,6 +18,27 @@ cat > /etc/opt/chrome/policies/managed/jarvis.json <<'JSON' { "CommandLineFlagSecurityWarningsEnabled": false } JSON +# Seed the profile's web-content language to Korean so sites (YouTube, Google, +# Naver) render in Korean. --lang sets Chrome's own UI, but the Accept-Language +# sent to sites comes from the profile's intl.accept_languages, which a persisted +# user-data-dir would otherwise keep at en-US regardless of --accept-lang. +PREFS_DIR="${CHROME_PROFILE_DIR:-/root/chrome-profile}/Default" +PREFS="${PREFS_DIR}/Preferences" +mkdir -p "$PREFS_DIR" +if [ -f "$PREFS" ]; then + python3 - "$PREFS" <<'PY' 2>/dev/null || true +import json, sys +p = sys.argv[1] +d = json.load(open(p)) +d.setdefault("intl", {}) +d["intl"]["accept_languages"] = "ko-KR,ko" +d["intl"]["selected_languages"] = "ko-KR,ko" +json.dump(d, open(p, "w"), ensure_ascii=False) +PY +else + printf '%s' '{"intl":{"accept_languages":"ko-KR,ko","selected_languages":"ko-KR,ko"}}' > "$PREFS" +fi + # Minimal, non-automation flags. --remote-debugging exposes CDP so the brain can # drive this on-screen Chrome (Google/YouTube/Naver), --disable-features=Translate # hides the translate popup. NO --test-type / --disable-blink-features. @@ -26,6 +47,7 @@ exec google-chrome \ --no-default-browser-check \ --disable-features=Translate,TranslateUI \ --lang=ko-KR \ + --accept-lang=ko-KR,ko \ --remote-debugging-port="${CDP_PORT:-9222}" \ --remote-debugging-address="${CDP_BIND:-127.0.0.1}" \ --user-data-dir="${CHROME_PROFILE_DIR:-/root/chrome-profile}" \