# ============================================================
# LocalClaw - .gitignore
# ============================================================

# --- DOCKER / ENV ---
.env

# --- SECRETS & CONFIG (NEVER COMMIT) ---
.localclaw/config.json
.localclaw/credentials/
.localclaw/vault/
.smallclaw/credentials/
.smallclaw/vault/
# The pattern above is anchored at the repo root, so per-user vaults one level down were never
# matched and every user's vault.key + vault.enc got committed — the master key sitting beside
# the file it decrypts. `.smallclaw/users/*/workspace/` (further down) covers that path today,
# but only for files not already tracked, which is exactly how these survived. Match a vault at
# any depth so a new one can never be added by a path nobody anticipated.
**/vault/vault.key
**/vault/vault.enc
**/vault/vault-audit.log
.smallclaw/*_api_key.txt
.smallclaw/*_api_token.txt
.smallclaw/*-key.txt

# --- SQLITE JOURNAL / BACKUP ---
.smallclaw/databases/*.db-shm
.smallclaw/databases/*.db-wal
.smallclaw/databases/*.db.bak.*
.smallclaw/databases/nohup.out

# Derived FTS mirror of Chroma vector-memory data (rag-hybrid-search upgrade) — fully
# regenerable via scripts/backfill-fts.ts, not source-of-truth data.
.smallclaw/databases/rag_fts.db

# --- PYTHON CACHE ---
scripts/__pycache__/
**/__pycache__/

# --- MISC ARTIFACTS ---
eng.traineddata

# --- LARGE BINARIES / INSTALLERS / MEDIA (keep out of git) ---
*.deb
web-ui/*.sf2
chatbot*.png

# --- DENTAL DICT PROJECT (.smallclaw/databases/) ---
.smallclaw/databases/dental_images/
.smallclaw/databases/__pycache__/
.smallclaw/databases/scratch/*
!.smallclaw/databases/scratch/README.md

# --- RUNTIME DATA ---
.localclaw/sessions/
.localclaw/logs/
.localclaw/memory/
.localclaw/facts.json
.localclaw/self_learning.json
.localclaw/jobs.db
.localclaw/update_state.json
.localclaw/tasks/
.localclaw/jobs/
.localclaw/ocr-cache/
.localclaw/heartbeat/
.localclaw/task-heartbeat.json
.localclaw/cron/runs/
.smallclaw/sessions/
.smallclaw/logs/
.smallclaw/memory/
.smallclaw/facts.json
.smallclaw/self_learning.json
.smallclaw/jobs.db
.smallclaw/update_state.json
.smallclaw/tasks/
.smallclaw/jobs/
.smallclaw/ocr-cache/
.smallclaw/heartbeat/runs/
.smallclaw/task-heartbeat.json
.smallclaw/cron/runs/
# .smallclaw/skills/
.smallclaw/workspace_state.json
.smallclaw/.migrated-from-localclaw

# --- PER-USER RUNTIME DATA ---
# Sessions, workspace runtime files, uploads are all user-specific runtime data.
# Keep: prompts/AGENTS.md, prompts/TOOLS.md, workspace/SOUL.md etc. (static templates)
.smallclaw/users/*/sessions/
.smallclaw/users/*/workspace/memory/
.smallclaw/users/*/workspace/uploads/
.smallclaw/users/*/workspace/attachments/
.smallclaw/users/*/workspace/pubmed/
.smallclaw/users/*/workspace/tool_audit.log
.smallclaw/users/*/workspace/HEARTBEAT.md
.smallclaw/users/*/workspace/note.txt
.smallclaw/users/*/workspace/*.html
.smallclaw/users/*/workspace/*.js
.smallclaw/users/*/workspace/*.css
.smallclaw/users/*/workspace/*.py
.smallclaw/users/*/workspace/*.sh
.smallclaw/users/*/workspace/*.bat
.smallclaw/users/*/workspace/*.txt

# --- PER-USER WORKSPACE: BLANKET IGNORE (2026-07-29) ---
# The per-user patterns above only covered memory/uploads/attachments and a handful of
# file extensions, which left every app-generated content directory exposed — detective/
# (case evidence: 고소장, 통화녹취 m4a, 정신과 소견서, 가족관계증명서), generated-media/,
# music/, pptx/, satellite-images/, writer/, code/ and more. That is private user data
# (403MB of it) that must never reach the remote, so ignore the whole subtree instead of
# chasing each new app's output folder. Files already tracked here (prompts/*.md and other
# shipped templates) are unaffected — gitignore does not untrack them, and their edits
# still show up in git status. Use `git add -f` to track a genuinely new template.
.smallclaw/users/*/workspace/

# --- GATEWAY RUNTIME STATE / SECRETS (2026-07-29) ---
# active-sessions.json maps live bearer tokens -> {username, role:"admin"}; committing it
# would publish working admin credentials for the gateway. The rest is per-machine runtime
# state or a stale pre-vault config backup — none of it belongs in the repo.
.smallclaw/active-sessions.json
.smallclaw/google-usage.json
.smallclaw/config.json.bak-*
.smallclaw/workspace/memory/
.smallclaw/workspace/weather-maps/
.smallclaw/workspace/task_result_*.txt
.smallclaw/voice/

# --- ROOT WORKSPACE RUNTIME FILES ---
# Keep: SOUL.md, SELF.md, IDENTITY.md, USER.md, MEMORY.md, AGENTS.md, TOOLS.md, BOOT.md, README.md
# These are default templates that ship with SmallClaw — new users need them.
workspace/memory/
workspace/tool_audit.log
workspace/HEARTBEAT.md
workspace/note.txt
workspace/*.html
workspace/*.js
workspace/*.css
workspace/*.py
workspace/*.sh
workspace/*.bat
workspace/*.txt

# --- DASHBOARD RUNTIME STATE ---
ai-dashboard/dashboard-state.json
ai-dashboard/dashboard-requests.json

# --- LOGS ---
gateway.log
gateway.err.log
*.log

# --- TEMP FILES ---
tmp_payload.json
mnt/
.tmp_*
.tmp_*/
.tmp_openclaw_*/
.tmp_codex_*

# --- VECTOR MEMORY (Chroma venv + data, large binary) ---
.chroma/

# --- NODE ---
node_modules/
dist/
*.js.map
package/
*.tgz

# --- TEST ARTIFACTS ---
tests/.golden-progress.log

# --- OS ---
.DS_Store
Thumbs.db
desktop.ini

# Valetudo 로봇청소기 (2호기 설치용 보관)
valetudo-helper-miioota
voicepack_ko/
