feat(api): /VERSION single source read at startup + GET /version
This commit is contained in:
@@ -17,8 +17,9 @@ from .canon_log import validate_canon_log
|
||||
from .narrate import run as narrate_run
|
||||
from .npc import UnknownNpc, run as npc_run
|
||||
from .ollama_client import ModelError
|
||||
from .version import VERSION
|
||||
|
||||
app = FastAPI(title="coc-rpg proxy", version="0.0.1")
|
||||
app = FastAPI(title="coc-rpg proxy", version=VERSION)
|
||||
|
||||
|
||||
@app.exception_handler(RequestValidationError)
|
||||
@@ -65,6 +66,11 @@ def health() -> dict:
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
@app.get("/version")
|
||||
def version() -> dict:
|
||||
return {"version": VERSION}
|
||||
|
||||
|
||||
# ── Role endpoints (charter §4) ──────────────────────────────────────────────
|
||||
# The client knows these paths and nothing about which model or prompt serves
|
||||
# them. Bodies are validated against the canon log contract. /dm/narrate is
|
||||
|
||||
Reference in New Issue
Block a user