Both found by adopting the shell in scribe, which is older than chrome and
had conventions of its own.
chrome answered an API error with {"error": ...}. FastAPI's convention is
{"detail": ...}, and scribe's client reads exactly that:
msg = (await r.json()).detail || msg
A missing key there does not fail - it falls back to r.statusText, so every
error message in the UI quietly becomes "Bad Request" and the real reason
is lost. That is the worst shape for a regression: no exception, no failing
request, just worse text. Both keys are sent now. marketplace and
agent-bridge read `error` and are unaffected.
chrome also registers /healthz, and being registered first it won over
scribe's - which reports whether whisper, piper and xtts are reachable,
the thing actually worth knowing when scribe is unwell. `health=False`
lets a service keep its own, the same way language_switcher=False already
lets it keep its own language control.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
35 lines
895 B
TOML
35 lines
895 B
TOML
[project]
|
|
name = "chrome"
|
|
version = "0.6.0"
|
|
description = "Shared page shell, design tokens and service helpers for the internal services."
|
|
requires-python = ">=3.13"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"jinja2>=3.1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8", "httpx>=0.27", "uvicorn[standard]>=0.30"]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["chrome*"]
|
|
|
|
# The shell is useless without its templates and static tree, and a wheel
|
|
# carries only .py files unless told otherwise. scribe shipped a broken wheel
|
|
# this way once; the container worked only because uvicorn imported from the
|
|
# source tree.
|
|
[tool.setuptools.package-data]
|
|
chrome = [
|
|
"templates/*.html",
|
|
"static/*.css",
|
|
"static/*.js",
|
|
"static/vendor/*",
|
|
"static/wa/**/*",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|