Commit Graph
7 Commits
Author SHA1 Message Date
truetype 7fcc2927c4 fix(prompt): istruzioni esplicite per update_quest
test / test (push) Has been cancelled
- Aggiunta istruzione: usa update_quest quando missione completata/fallita
- Esempio update_quest spostato in cima negli esempi
- Quest ID nel contesto per permettere al LLM di referenziarle
2026-06-28 10:06:14 +02:00
truetype b985df0017 feat(tools): add update-quest tool, switch to Big Pickle (opencode/zen)
- update_quest: aggiorna stato/nome/descrizione missioni
- db: get_quest(), update_quest con nome+desc
- prompt: quest_id nel contesto, esempio nei tool examples
- Switch da deepseek-v4-flash (go) a big-pickle (zen) — gratuito
2026-06-28 10:01:33 +02:00
truetype eacc946868 fix: JSON repair, WS thread pool, switch to DeepSeek V4 Flash, funnel Lv0
LLM fixes:
- _try_repair_json() — ripara JSON malformato (apici, virgole trailing)
- _strip_json_from_text() — rimuove residui JSON dalla narration
- parse_tool_call() — rimuove troncamento 200 caratteri dal fallback

DM fixes:
- Fallback euristico quando params vuoti (dm.py)
- Estrazione narrazione da dm_override/narrate params.params.text

Prompt (prompts.py):
- Vietati termini tecnici/scientifici/anacronistici (HPLC, laser, ...)
- Aggiunto vocabolario fantasy obbligatorio

Server (server.py):
- dm_cycle in ThreadPoolExecutor per non bloccare WS ping
- WebSocketDisconnect gestiti
- Rimosso import inesistente db_schema

Frontend (index.html):
- Nascosti tool name dalla chat
- Personaggio -> PG, connessioni aree con nomi

Infrastruttura:
- Switch da openrouter/free a DeepSeek V4 Flash via OpenCode Go
- pyproject.toml, Dockerfile, docker-compose.yml, start.sh
- .env auto-load (start.sh)
- Funnel Lv0 (funnel.py) — creazione PG livello 0

Docs: architecture, database, setup, game mechanics, codebase ref
2026-06-28 08:18:24 +02:00
truetype 6b048dc0cc feat(engine): persistenza enigmi, inventario strutturato, HP mostri
test / test (push) Has been cancelled
Fase 2 del remediation plan:
- set_puzzle_state / is_puzzle_solved per enigmi area
- update_inventory su character_items con add/remove/equip/list
- combat() legge HP da combat_state e persiste danno
- dm_cycle inietta campaign_id nei tool che ne hanno bisogno
- helpers db: dedup inventario, remove/equip per nome

Fase 4 del remediation plan:
- test integrazione dm_cycle con LLM mockato (5 test)
- test WebSocket handler con mock (4 test)
- CI minimo .gitea/workflows/test.yml
2026-06-27 18:29:32 +02:00
truetype cb45172717 refactor: remediation plan Fase 0-4 completata
- Fase 0: env var allineate, SYSTEM_PROMPT deduplicato, .gitignore pulito
- Fase 1: GameContext isolato, ciclo DM unificato, provider thread-safe (contextvars)
- Fase 2: DB schema esteso (current_area_id, combat_state, character_items)
- Fase 3: thread-local connection pool + WAL + busy_timeout
- Fase 4: test suite (32 test, 100% pass)
- heuristic_fallback come parser di riserva (non secondo pilota)
2026-06-27 18:00:03 +02:00
truetype 90f823fdb9 feat: AI Dungeon Master engine + web frontend
- Engine: stato SQLite, state machine, 10 approved tools, parser azioni
- LLM: multi-provider (Ollama/OpenRouter/Local), system prompt DCC
- DM cycle: LLM decide tool → engine esegue → narrazione + meccanica
- Dati avventura: JSON machine-readable con 9 aree, mostri, enigmi, quest
- Web: FastAPI + WebSocket backend, SPA frontend dark fantasy
- Ref: architecture-patterns/neon-scratch-lounge (separazione reasoning/execution)
2026-06-26 20:31:34 +02:00
truetype ae73fe43d3 feat: initial DCC RPG knowledge base + AI DM design 2026-06-25 20:32:05 +02:00